Indonesia has staged what has been described as the world's most ambitious and complicated single-day election.
More than 600,000 polling booths were needed
The country's 147m voters have been choosing four levels of government - the national parliament and three tiers of local officials.
Opinion polls suggested that Golkar, the party which backed ousted president Suharto, could emerge as the biggest party in parliament.
The results could have a big impact on presidential elections later this year.
Polls closed at 1pm local time (0600 GMT). Some districts may announce their winners on Monday, but official results are not due to be announced before 28 April.
The BBC's correspondent in Jakarta, Rachel Harvey, says that Golkar's apparent resurgence is due to economic hardship and security concerns which have led to a degree of nostalgia for the certainties of the past.
Added to that is a growing sense of disappointment with President Megawati's Indonesian Democratic Party of Struggle (PDI-P), which critics say has failed to push ahead with promised reforms.
5 April - Legislative polls, contested by 24 parties
July - Presidential poll, contested by parties that win at least 3% of seats in legislative polls
September - Possible run-off if no-one wins 50% of total and 20% of votes in at least half the provinces
President Megawati faces re-election herself in July, with the polls suggesting her personal popularity is also slipping.
She could now face a strong challenge from her former security minister, Susilo Bambang Yudhoyono, who resigned from the cabinet last month.
He has set up his own party, the Democrat Party, and polls have shown that he has replaced Ms Megawati as the favourite candidate for winning the presidency.
However, his eligibility for the presidential election depends on the performance of his party in the parliamentary elections, which are being contested by 24 different parties.
Only parties or coalitions that get more that 5% of the vote or 3% of the 550 seats will be allowed to field candidates for the presidential election, the first round of which is due on 5 July.
Opinion polls have suggested that no party will win an overall majority in the national parliament. But they have shown that the Golkar Party could overtake Ms Megawati's PDI-P as the largest parliamentary grouping.
Golkar claims to have embraced democracy and reform, six years after President Suharto was forced out of office because of mass demonstrations against corruption.