A health official said 23 people, including nine policemen, were killed and 40 wounded, among them 17 policemen, in the first of three bomb explosions on Saturday in the city north of Baghdad.
The fourth blast occurred at 12:30pm (0930 GMT) when a bomber rammed a car into a police station, killing 10 Iraqi police officers and wounding five, police said.
The local commander of the Iraqi rapid reaction force, Brigadier Abd al-Razzaq al-Jarmin, was among the dead in the first two blasts near the town hall and a nearby checkpoint.
Samarra's mayor, Major General Tariq Uwaid, was wounded.
"I saw a car trying to reach the town hall," bookshop owner Muhammad Ahmad said. "When police stopped it, it exploded."
Police said anti-US forces carried out simultaneous attacks on the three police stations, killing four policemen, wounding 17 and capturing 10.
Witnesses said US troops opened
fire amid chaos in the city centre
Another car bomb exploded later, targeting a US convoy that was trying to reach the scene of the first two bombings, police said. They had no word on casualties in that attack.
A US military spokesman gave no information about the attack. "I cannot confirm at this stage if there was any attack on an MNF (multinational force) convoy or checkpoint in Samarra."
Witnesses said US troops opened fire amid chaotic scenes in the city centre, hitting some cars. Rescue services could not immediately reach them to evacuate any casualties.
Residents said the US military had declared a curfew due to start at midday (0900 GMT).
"I saw a dead national guard burning on the ground," said one witness after the first bombings at 9am. "I saw people carrying away another corpse."
US and Iraqi forces stormed Samarra early last month to drive armed fighters off the streets of the city, 100km north of Baghdad, but fighters have remained active.
"I saw a car trying to reach the town hall. When police stopped it,
Fighters often attack state buildings and fledgling security forces to undermine Iraq's US-backed interim government.
In September, US and Iraqi forces seized control of Samarra.
Since then, Iraqi officials said the city had been an example of how the Americans and the Baghdad government could restore order in restive areas.
Twenty US soldiers were wounded in action on Saturday in the Iraqi city of Ramadi, a US military spokesman said.
"Twenty soldiers assigned to the 1st Marine Expeditionary Force were wounded in action today while conducting increased security operations in Ramadi," the spokesman said, updating an earlier toll.
US and Iraqi forces took over the
city last month after an assault
He was unable to give further details.
Locals from the city, 100km (60 miles) west of Baghdad, said a "suicide car bomb" exploded outside a US military base at about 12:50pm (0950 GMT) in the al-Fujariyah district, at the entrance of Ramadi.
The lifeless bodies of Iraqis caught in the attack were scattered on the road outside the base, according to two witnesses.