Prime Minister Nouri Maliki had called on voters to turn out in large numbers, saying that participation would boost democracy.
In Washington US President Barack Obama hailed an "important milestone in Iraqi history" and congratulated Iraqis on their courage.
"Today, in the face of violence from those who would only destroy, Iraqis took a step forward in the hard work of building up their country," he said.
There were mortar, grenade and bomb attacks in Baghdad and in other cities, including Mosul, Falluja, Baquba and Samarra.
AT THE SCENE
By Hugh Sykes, BBC News, Iraq
In a small village near Ramadi in Anbar province west of Baghdad, 300 of the 400 people on the electoral roll had already cast their vote by mid-morning.
It was like a party - hugs, smiles and animated conversations. Many parents brought their children with them. No sign that anyone had been intimidated by threats from al-Qaeda in Iraq.
Far to the south, in the holy city of Najaf, a similarly festive - and defiant - mood. The corridors of a Najaf school echoed with a babble of happy chat.
Three small boys crowded round their dad as he cast his vote, and then - like him - they dipped their fingers in the purple ink.
And a student of English, Zaid Mirza, said he had voted "for change, and new faces".
But the capital was hardest hit, with dozens of mortar shells falling in several neighbourhoods. Twenty-five people were killed in one explosion that destroyed a residential building in the north of the city.
Despite the attacks, turnout was reported to have been steady in Baghdad and elsewhere.
Queues were also reported at polling stations in Sunni areas of the country, where many people in 2005 decided not to vote.
The election took place against a backdrop of much-reduced violence, with casualty figures among civilians, Iraqi forces and US troops significantly lower than in recent years.
But hundreds of people are still being killed each month, corruption is high and the provision of basic services such as electricity is still sporadic.
Islamic militants had pledged to disrupt the voting process with attacks - a group affiliated to al-Qaeda distributed leaflets in Baghdad warning people not to go to the polls.
Candidates from 86 factions were vying for 325 parliamentary seats, with some 19 million Iraqis eligible to vote.
IRAQI GENERAL ELECTION
Voting to elect 325-member parliament.
About 19 million eligible voters out of 28 million
Around 6,200 candidates from 86 factions competing
200,000 security personnel on duty in Baghdad
Key issues: Security, services and disqualification of alleged Baathists
Previous votes: Jan 2005 (transitional national assembly), Oct 2005 (constitution), Dec 2005 first post-invasion parliament, Feb 2009 (local elections)
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.