A suicide bombing at a restaurant in the Shiite neighborhood of Iraq’s capital killed at least 12 people. The bombing was followed by two more attacks killing more than 20 people. (Reuters)

Jubilant Iraqis thronged Baghdad’s main square at midnight Saturday to celebrate the end of the curfew imposed by U.S. troops in 2003, hailing the new freedom to stay out all night as a sign that their capital is finally coming back to life.

The day was darkened by a rash of bombings in the morning in which at least 36 people died, a reminder that the city still is far from safe.

Baghdadis, hardened by years of war, seemed undeterred, however, by the uptick in violence. The crowd that gathered in downtown Tahrir Square numbered in the hundreds as midnight struck, but as word spread that people were gathering, cars streamed through previously forbidden streets to join the fun.

A band played Iraqi songs, children were lifted onto their fathers’ shoulders and even some of the policemen keeping watch joined in the dancing.

“I am just crazy happy,” said Sara Adams, 22, who was 10 when the curfew was first imposed and has never stayed out after midnight. “Maybe it’s still a little dangerous, but I just want to live my life for the moment.”

A member of the Iraqi security forces walks past the site of a bomb attack in Baghdad Saturday. More than 30 people were killed in three bombings around Baghdad on Saturday, police said, hours before the government was due to lift a long-standing night-time curfew on the capital. (Stringer/Iraq/Reuters)

Bombings had become relatively rare in recent months, and Baghdad had already begun to breathe a little easier, prompting Iraqi Prime Minister Haidar al-Abadi to announce last week that the curfew would be lifted Saturday night.

Interior Ministry spokesman Brig. Gen Saad Maan said he did not believe Saturday’s attacks were linked to the lifting of the curfew, which was first imposed by U.S. troops when they entered Baghdad in 2003. He accused the Islamic State of carrying out the attacks in order to assert its continued presence in the capital at a time when setbacks on the battlefield elsewhere have left the group feeling vulnerable.

“They need to do these attacks to show their people they are still here,” he said.

Even if the attacks escalate, the government won’t change its mind about the curfew, he added. “Of course they will try to make problems,” he said, referring to the Islamic State. “But we have our destiny, we have our faith and we can manage.”

The attacks Saturday morning harkened to the past, with three bombs exploding in rapid succession in two different parts of the city. A suicide bomber detonated an explosive vest outside a restaurant in a busy street in the eastern neighborhood of New Baghdad, killing 22, according to Maan. Shortly afterward, two bombs exploded in the Souk al-Araby clothing market in the center of the city, killing 10, he said.

A fourth bomb exploded a few hours later in the southwestern neighborhood of Abu Dshir, killing four, the Interior Ministry reported.

The frequency and intensity of bombings has decreased significantly, however, since the Islamic State surge into northern Iraq last summer focused the war outside the capital, suggesting the group’s capacity to wage the kind of mass casualty attacks that terrorized Baghdad for years has diminished.

The replacement of Nouri al-Maliki as prime minister also heralded a more relaxed mood, many Iraqis say, and Iraqis had begun to enjoy themselves. At night the streets typically buzz with life as Iraqis venture out to many of the restaurants, clubs and bars that have opened up around the city.

“It’s the end of the dictator Maliki,” said Hatem Tome, 25, as he joined in the dancing in the square. He had helped organize Arab Spring-style protests there in 2011, for which he was imprisoned for several months. “Now we have a new life.”