Forces loyal to Prime Minister Nuri al-Maliki launched an early morning push to repel Islamic State militants who fought their way on Thursday into a military base on the edge of Muqdadiya, 80 km (50 miles) northeast of the capital.
Heavy fighting raged for hours and continued on Saturday afternoon, local security sources said.
Sources at the morgue and hospital in the nearby town of Baquba said they had received the bodies of 15 Shi'ite militia fighters transferred after the morning's fighting.
State TV also reported 24 "terrorists" had been killed. Seven civilians including children from nearby villages were killed by helicopter gunship fire, police and medics said.
The Sunni militants had moved towards the base after seizing the town of Sadur just to the north, another security source and witnesses said. They were equipped with artillery and mortars and drove vehicles including captured tanks and Humvees.
In the western city of Falluja, a hospital received three bodies and 18 wounded people on Saturday after army helicopters bombed the city, government health official Ahmed al-Shami said.
Kurdish peshmerga security forces attacked Islamic State positions in Jalawla late on Friday, killing at least 15 militants and three Kurdish security personnel, spokesman Halgurd Hikmat said. The town, in the eastern province of Diyala near the Iranian border, was seized by insurgents last month.
Bickering lawmakers in Baghdad are under pressure from the United States, the United Nations and Iraq's own Shi'ite clerics to form a new government swiftly to deal with the Sunni insurgency, which seized territory in the north and west last month, and has held it in the face of ground and air attacks.
Few doubt an inclusive government is needed to hold Iraq together, but there is no consensus on who should lead it.
The national parliament elected in April met for the first time on July 1 but failed to agree on nominations for the top three government posts.
The UN special envoy to Iraq, Nickolay Mladenov, said the country could plunge into chaos if parliament fails to move forward on a government in the next session now set for Sunday.
He also urged lawmakers to turn up, after fewer than a third attended the first session when Sunnis and Kurds walked out after Shi'ites failed to nominate a premier to replace Maliki.
US vice president Joe Biden talked on Saturday with Masoud Barzani, president of the Iraqi Kurdistan Region, and discussed the need for the quick formation of a government and peaceful resolution of territorial disputes, the White House said.
With politics in Baghdad paralysed, and Maliki continuing in a caretaker role, the fighting raged on. The death toll rose to 30 on Saturday from a suicide bomb attack on Friday at a Kurdish-controlled checkpoint in Kirkuk province, where families fleeing violence in Tikrit and other areas overrun by militants last month were waiting to pass.
Sunnis name speaker nominee
Maliki's opponents accuse him of ruling for the Shi'ite majority at the expense of the Sunni and Kurdish minorities, and want him to step aside. But he shows no sign of quitting. His State of Law coalition is the biggest group in the Shi'ite National Alliance bloc. Under a system created after the removal of Saddam Hussein in 2003, the prime minister has always been a member of the Shi'ite majority, the speaker of parliament a Sunni and, with one exception, the occupant of the largely ceremonial presidency has been a Kurd.
In a sign of progress on Saturday night, the main Sunni political coalition chose lawmaker Salim al-Jabouri, a moderate Islamist, as its nominee for parliament speaker, a senior Sunni politician said.
The naming of the speaker in Sunday's session would be the first step in naming a government more than three months after national elections.
After the speaker is named, parliament has 30 days to name a president and the president has 15 days to nominate a prime minister. But there is much pressure from Shi'ite clerics and the international community to announce all three top posts as a "package" amid fear of the country's fragmentation.
The move appeared to be a goodwill gesture by the Sunni bloc to overcome the impasse, but nothing is sure before Sunday's session because of the volatile political situation.
Senior Shi'ite parliamentarian Bayan Jaber, a former interior and finance minister, said this week he hoped the National Alliance could agree on its nominee for prime minister before Sunday's meeting. But he said that if Maliki remained the sole nominee, "the problem will remain".
Shi'ite lawmaker, Dhiaa al-Asadi of the Al-Ahrar bloc, a party close to cleric Moqtada al-Sadr and opposed to Maliki, was not optimistic about the Sunday meeting, saying there was still no consensus among the National Alliance over the nominee.
"I don't think tomorrow is going to bring things forward any further," he told Reuters.
Sunni lawmaker Dhafer al-Ani said this week that "partition of Iraq will be the natural result" if the Shi'ite bloc could not put forward another candidate. He earlier made clear the Sunnis would withdraw their speaker nominee if Maliki was announced as the Shi'ite bloc's choice for prime minister.
The head of the Kurdish Gorran bloc, Aram Sheikh Mohammed, said Kurdish factions would attend Sunday's session, but the prospects of progress were poor.
Saddam aide praises insurgency
The political deadlock raises fears that Iraq could splinter along ethnic and sectarian lines, a reality already playing out in parts of the country.
The Islamist-led offensive has been largely halted for now just north of the Iraqi capital, although the Sunni insurgents continue to threaten to bear down on the capital.
A purported audio message from a close aide to the late dictator, Saddam, called on all Iraqis to join efforts to "liberate" the country and praised Sunni militants who led last month's dramatic offensive through northern Iraq.
The voice recording released on a website loyal to Saddam's ousted Baath Party was said to have been made by Ezzat Ibrahim al-Douri, the most senior member of his entourage still at large after Saddam's overthrow by a US-led invasion force.
"The liberation of Baghdad is around the corner," said the voice on the recording, which resembled previous tapes released in his name.
Tensions are high in Sunni areas north of Baghdad where Islamic State militants have lashed out at communities they see as supporting government forces.
Iraqi security forces and government-affiliated militias appear to have unlawfully executed at least 255 prisoners over the past month in apparent revenge for killings by Islamic State fighters, a Human Rights Watch report said.
Some 29 people, 20 of them women, were killed on Saturday evening in an apartment building in eastern Baghdad by gunmen wearing a mix of plain clothes and camouflage, a police officer and a hospital official said.
Shi'ite militias have been accused by locals of carrying out killings of women branded as prostitutes in that district.
There was no way to confirm immediately who was responsible for the attack, but a police officer told Reuters that in flats where groups of women were found shot dead, scrawled in black were the words: "This is the punishment of those practicing prostitution."