One attack was a ground assault on Iraqi security forces in suburban Abu Ghraib that left at least 17 dead.
The other was a twin suicide bombing at an outdoor market in the city that killed at least 31 and injured dozens more.
The self-proclaimed Islamic State, or IS, has claimed responsibility for both.
Sunday was a deadly day in Baghdad.
First, IS militants attacked Iraqi security forces in Abu Ghraib, on the outskirts of the city.
It was the largest IS assault near the capital in months.
Suicide bombers and gunmen attacked at dawn, killing at least 17 members of the security forces.
Later in the day, in the Sadr City district of Baghdad, two suicide bombers riding motorcycles blew themselves up in a crowded mobile-phone market.
One witness pointed the blame squarely at Prime Minister Haider al-Abadi's Government.
"A twin bombing took place at this market. One of the bombs targeted a mobile-phone shop. The Abadi Government must bear full responsibility."
It comes as the Iraqi army is preparing an attack of its own.
The army is mobilising thousands of troops ahead of an offensive to retake the northern city of Mosul from IS.
An army official says soldiers are assembling at Makhmur, a military base 70 kilometres south-east of Mosul, hoping to attack the city with help from Kurdish forces.
"Troops from the 71st brigade of the 15th division moved from Taji towards Mosul to Makhmur. And God willing, it will liberate Mosul province with Peshmerga forces and allies."
Mosul is effectively the capital of the IS territory, and a defeat there would be a major blow for the militants.
The Iraqi government pledged to retake Mosul this year.
But the fight for the city will not be easy.
It is the largest city controlled by IS, with more than a million people still living there.
Retaking it would be a huge boost for the Iraqi forces, who reclaimed the western city of Ramadi in late December.
United States Secretary of State John Kerry says the Iraqi forces are making strong progress against IS.
"The Iraqis have taken back 40 per cent of the territory that they held in Iraq. We've liberated Tikrit -- they have liberated Tikrit. They have liberated Ramadi. They're now moving on Hit. They're going to be doing that in Mosul. We've cut off the main road between Raqqa and Mosul. The secondary roads are being cut off. There have been more than 10,000 air strikes. People have been eliminated from the battlefield. We're eliminating their money. They've cut their money to their fighters by 50 per cent -- in some cases, eliminated it. We're taking away their source of revenue."
Mosul is a complicated target, home to a number of rival religious and ethnic groups.
The armed forces of the autonomous Kurdish region, known as the Peshmerga, will fight with the Iraqi army in the battle for the city.
Despite the pressure on Mosul, one security analyst in Baghdad says the IS attacks there suggest it is too early to say the group is losing the initiative in Iraq.
Share
