Saddam Hussein's execution has closed a dark chapter in Iraq's history, Prime Minister Nouri Maliki has said.
Mr Maliki said the former leader had faced his fate "like all tyrants".
Shias celebrated the pre-dawn hanging while some Sunni towns saw protests. About 70 people died in attacks in two mainly Shia areas after the execution.
Saddam's final moments Video
A witness describes Saddam Hussein's final minutes
The former Iraqi leader was sentenced to death by an Iraqi court on 5 November over the killings of 148 Shias from the town of Dujail in the 1980s.
Iraqi state TV showed images of Saddam Hussein, 69, being taken to the gallows in a Baghdad building his intelligence services once used for executions.
However the moment of his execution was not shown. Pictures of his body wrapped in a shroud were later broadcast on TV.
The hanging took place just days after he lost an appeal and hours after he was handed over from US custody.
There remains some confusion over where the former Iraqi leader is to be buried.
His body was reportedly flown to his home village of Awja near Tikrit, where his two sons are buried, aboard a US aircraft and handed over to clan leaders for burial.
However, Saddam Hussein's family said late on Saturday that it had been decided to bury him in the Sunni insurgent stronghold of Ramadi, citing family circumstances and the security situation prevailing in Iraq.
A small group of Iraqis - including a representative of the prime minister - witnessed the execution at 0600 (0300GMT) in a spartan, concrete-lined chamber in the suburb of Khadimiya.
Iraqi National Security Adviser Mouwafak al-Rubaie told the BBC the former leader went to the gallows quietly:
"We took him to the gallows and he was saying some few slogans. He was very, very, very, broken."
Pictures broadcast later on Iraqi TV showed a subdued Saddam Hussein being led to the gallows by a group of masked men.
Dressed in a white shirt and dark overcoat, rather than prison garb, Saddam Hussein was led up onto the gallows platform. A dark piece of cloth placed around his neck, followed by the noose.
But when the hangman stepped forward to put a hood over his head, Saddam Hussein made it clear he wanted to die without it.
Later, images of Saddam Hussein's body were also broadcast on Iraqi TV, still dressed in his overcoat and wrapped in a white sheet.
In a statement, Prime Minister Maliki said: "Justice, in the name of the people, has carried out the death sentence against the criminal Saddam, who faced his fate like all tyrants, frightened and terrified during a hard day which he did not expect," it read.
US President George W Bush hailed the execution as "an important milestone" on the road to building an Iraqi democracy, but warned it would not end the deadly violence there.
As news of Saddam Hussein's demise spread, there were jubilant scenes in the Baghdad Shia stronghold of Sadr City, with people dancing in the streets and sounding their car horns. Similar scenes were witnessed in the Basra and Najaf.
But in Tikrit, where a curfew was imposed, the news sparked protests from supporters.
Protests were also reported in Samarra and Ramadi.
Hours after the execution, at least 31 people died when a car bomb exploded at a market in the southern town of Kufa. Angry crowds killed a man who police said got out of the vehicle shortly before the bomb exploded.
Later in the day, at least 37 people died and 76 were injured in at least two blasts in the Hurriya district of Baghdad.