Attacks in Baghdad, including a suicide bombing inside a restaurant, killed at least 32 people on Saturday, hours before a years-old nightly curfew was due to be lifted, officials said.
Doing away with the curfew is a major change to a longstanding policy aimed at curbing violence in the capital by limiting movement at night.
The suicide bomber struck in the Baghdad Jadida area in the capital's east, killing at least 23 people and wounding at least 43, officials said updating an earlier toll.
There was no immediate claim of responsibility for the blast, which was one of the deadliest to hit the capital in months.
But suicide bombings in Iraq are almost exclusively carried out by Sunni extremists, including the Islamic State (IS) jihadist group, which spearheaded a sweeping offensive in June that overran large areas north and west of Baghdad.
Another attack -- said to have been either a suicide or roadside bombing -- hit a commercial area in central Baghdad, killing at least nine people and wounding 28, officials said revising a lower toll.
Militants often target crowded places such as cafes, restaurants, markets and mosques in a bid to cause maximum casualties.
As the attacks are carried out during the day or early evening when most people are out, the curfew has little impact on that type of violence.
Saturday's attacks illustrate the persistent danger of violence in Baghdad even as the nightly curfew was set to end at midnight (2100 GMT) in the city.
Prime Minister Haider al-Abadi ordered the move this week, a decision his spokesman said was taken so there would "be normal life as much as possible, despite the existence of a state of war".
The decision to lift the curfew comes as Iraqi forces battle to regain ground from IS jihadists with support from US-led air strikes as well as international advisers and trainers.
It was initially feared that Baghdad itself could be assaulted by IS.
But federal forces that were swept aside in the early days of the offensive have regained significant territory with support from Shiite militiamen, Sunni tribesmen and the US-led air strikes.
In the north, forces from Iraq's autonomous Kurdish region are also making gains against IS, and evidence of atrocities probably committed by the group has been found in retaken areas.
The remains of dozens of members of Iraq's Yazidi religious minority have been discovered in mass graves in north Iraq over the past week, with a Kurdish official saying some had been shot and others had their hands bound.
But gains by security forces have not stopped militants from carrying out attacks in Baghdad, which they were able to do even when violence was at a low ebb in 2011-2012.
Scrapping the curfew does away with a measure that restricted the lives of ordinary people while doing little to stop the near-daily attacks they have suffered for years.
Some Baghdad residents welcomed the decision for the increased freedom of movement it brings, but others are worried it could allow criminals and militias to step up attacks.
Kidnappings that are generally blamed on Shiite militias are a significant problem, sometimes resulting in demands for exorbitant ransoms, while in some cases victims disappear without a trace.