More than 100 mourners took cover in a cemetery in Muqdadiya, 100km northeast of Baghdad, after they came under fire from mortars on Wednesday, an Iraqi security official said.
A bomber wearing an explosive vest blew himself up among them.
Dr Firas al-Nida of the Muqdadiya hospital said the number of dead could exceed 30, making it the bloodiest single incident since the election on 15 December.
The funeral was being held for the victims of an assassination attempt on Tuesday on a local leader of the Dawa party of Ibrahim al-Jaafari, the Iraqi prime minister.
The leader was badly wounded in that attack and his son and a bodyguard were killed.
Elsewhere on Wednesday at least 11 more Iraqis were killed and 40 wounded when fighters carried out a series of attacks on police and on a petrol convoy to fuel-starved Baghdad.
Police said fighters ambushed a convoy of 18 trucks, escorted by security forces, on a road linking the country's main oil refinery at Baiji to Baghdad, setting fire to one truck and killing its driver.
Power stations have been hit by
the closure of the refinery in Baiji
Oil shipments from Baiji, 200km north of Baghdad, were interrupted for nearly 10 days in late December after tanker drivers walked off the job because of death threats from fighters.
The disruption led to fuel shortages in a number of towns and bloody riots in the northern town of Kirkuk, where two petrol stations were torched.
Two civilians were killed and two wounded when an explosive device targeted a US military convoy in the northern city of Kirkuk, Captain Mohammed Adel said.
There was no immediate word on US casualties.
In Baquba, northeast of Baghdad, one soldier and one civilian were wounded when a roadside bomb went off next to an Iraqi army patrol.
And in Baghdad, five people were killed and 13 wounded when a car bomb exploded outside a police station in the Shia district of Kadhimiyah, an Interior Ministry official said. Casualties included both police and civilians.
A police commando was also killed and 18 others wounded in clashes with fighters in the west of the city, an official at Yarmuk hospital reported. Many had shrapnel wounds.