A series of blasts and a suicide bomber hit mainly Shi'ite areas in Baghdad on Thursday, killing at least 40 people in the first major attack on Iraq's capital since a crisis erupted between its Shi'ite-led government and Sunni rivals just days after the U.S. troop withdrawal.

The apparently coordinated bombings were the first sign of rising violence after Shi'ite Prime Minister Nuri al-Maliki moved to sideline two Sunni leaders, just a few years after sectarian killings drove Iraq to the edge of civil war.

In the largest blast, at least 18 people were killed when a suicide bomber driving an ambulance exploded the vehicle near a government office in Karrada district, sending up a large dust cloud and scattering car parts into a nearby kindergarten, police and health officials said.

We heard the sound of a car driving, then car brakes then a huge explosion, all our windows and doors are blown out, black smoke filled our apartment, said Maysoun Kamal, who lives in a Karrada compound.

At least 40 people were killed and 149 more were wounded from more than ten explosives in Baghdad, said Ziad Tareq, a spokesman of Iraq's health ministry.

Two roadside bombs struck southwestern Amil district, killing at least seven people and wounding 21 others, while a car bomb blew up in a Shi'ite neighbourhood in Doura in the south, killing three people and wounding six, police said.

More bombs ripped into the central Alawi area, Shaab and Shula in the north, all mainly Shi'ite areas, and a roadside bomb killed one and wounded five near the Sunni neighbourhood of Adhamiya, police said.

Violence in Iraq has ebbed since the height of sectarian violence in 2006-2007 when suicide bombers and hit-squads targeted Sunni and Shi'ite communities in attacks that killed thousands and pushed the country to the brink of civil war.

Iraq is fighting a stubborn insurgency with Sunni Islamists tied to al-Qaeda and Shi'ite militias, who U.S. officials say are backed by Iran, still staging daily attacks.

US TROOPS OUT ONLY DAYS AGO

The last few thousand American troops pulled out of Iraq over the weekend, nearly nine years after the invasion that toppled Sunni dictator Saddam Hussein. Many Iraqis had said they feared a return to sectarian violence without a U.S. military buffer.

Days after the withdrawal, Iraq's fragile power-sharing government is grappling with its worst turmoil since its formation a year ago. Shi'ite, Sunni and Kurdish blocs share out government posts in a unwieldy system that has been stymied by political infighting since it began.

Shi'ite Maliki this week sought the arrest of Sunni Vice President Tareq al-Hashemi on charges he organised assassinations and bombings, and he asked parliament to fire his Sunni deputy Saleh al-Mutlaq after he likened Maliki to Saddam.

The moves against the senior Sunni leaders are stirring sectarian tensions as Sunnis fear the prime minister wants to consolidate Shi'ite control.

Iraq's Sunni minority feel marginalised since the rise of the Shi'ite majority in Iraq after the 2003 invasion. Many Sunnis feel they have been shunted aside in the power-sharing agreement that Washington touts as a young democracy.

Thursday's attacks were the first major offensive in Baghdad since November when three bombs exploded in a commercial Baghdad district and another blast hit the city's western outskirts on Saturday, killing at least 13 people.

In October, bomb attacks on a busy commercial street in northeastern Baghdad killed at least 30, with scores wounded.

(Additional reporting by Aseel Kami; Writing by Patrick Markey and Rania El Gamal; Editing by Michael Roddy)