Police officials said that the men ambushed an Iraqi police convoy, killing 28 policemen, including the commander, and wounding 25 more, although some reports said that the number of dead included the attackers.
The identity of the fighters is not clear, although recent clashes in the town have reportedly involved fighters believed to be members of the Mahdi Army militia who are loyal to Moqtada al-Sadr, the Shia cleric.
Baquba, a mixed Sunni and Shia town, has seen heavy clashes between police forces and militia groups from both sides in recent months.
Earlier on Thursday unknown gunmen attacked a station for an Iraqi special police force in the town, killing six police and wounding 10.
Around 50 more policemen have been reported missing following the attack, police sources told Reuters news agency.
Meanwhile, at least four US marines and one US sailor have died in fighting in Iraq’s volatile al-Anbar province, while 11 policemen were also killed in attacks north of Baghdad.
The US military said in a statement that the five military personnel all died from wounds suffered in attacks on Wednesday in the western province.
The latest deaths have pushed October’s death toll to 96, the highest for US forces since the same month last year when the same number were killed.
US officials have attributed the higher death toll to a spike in violence during the holy Muslim month of Ramadan, which ended this week, as well as additional patrols launched as part of a security drive in Baghdad.
Also on Thursday, the Iraqi interior ministry has ordered the holiest shrine in Shia Islam in the southern city of Najaf to close on Thursday, the last day of the Eid al-Fitr holiday, following fears of an imminent attack.
Authorities also ordered pilgrims to stay away from mosques and shrines in Najaf – including the revered mausoleum of Imam Ali, the most important site of worship in the Shia world.
Sunni extremists inspired or led by the al-Qaeda network have carried out several attacks on Iraqi Shia shrines, including the mausoleum, as part of a successful attempt to foment sectarian violence.
In August, a suicide bomber blew himself up at the police gate of the Imam Ali shrine, killing 35 people, while two years ago a huge car bomb in the same place killed more than 80, including Mohammed Bakr Hakim, the then head of the powerful Shia party the Supreme Council for the Islamic Revolution in Iraq (SCIRI).