The explosion triggered new anger at Iraq's leaders and their armed forces, who will soon take over responsibility for the country's security on their own as U.S. troops rapidly leave the country. Violence has dropped since the height of Iraq's bloodshed a few years ago, but Iraqi forces have failed to stop attacks that continue to claim lives daily.
The blast took place in a town just outside Hillah, about 60 miles south of Baghdad, said police and hospital officials in the city. Forty-eight people were also injured in the violence.
The officials spoke on condition of anonymity because they were not authorized to speak to the media.
The car was located in a parking lot of the mosque. The mosque as well as a nearby holy Shiite shrine were damaged, although it was not known how significant the damage was.
"I heard the blast, then was hit by glass from windows and my hand was bleeding severely," said Mohammed Ali, a 42-year-old farmer who was inside the mosque when the bomb hit.
"I blame the security forces for such a horrible breach. How can such a thing happen? Where were they?" Ali said.
The deputy chairman for the province where Hillah is located, Sabah Allawi, said the funeral was for a prominent Shiite sheik.
"The blast was from a parked car bomb targeting the people at the Shiite shrine," Allawi said.
A member of the provincial council, Mansour al-Maniaa, said the council would hold an emergency session Saturday to discuss the explosion.
"This is a security breach that the security apparatus should be held accountable for," he said. "This area had weak security protection, therefore terrorists easily reached and targeted it."
There was no immediate claim of responsibility, but Sunni militants such as al-Qaida often target Shiite mosques and neighborhoods as a way to stir up sectarian violence.
Friday evening's blast happened not far from another strike earlier this month that police and hospital officials said killed 15 people and wounded 41.
In that Sept. 14 attack, a car bomb parked outside a restaurant in the Hillah suburb village of al-Shumali exploded as police were eating breakfast inside.
The attacks come at a precarious time for Iraq, torn between wanting to assert its sovereignty without the help of U.S. forces while also recognizing that its own soldiers and police are not yet ready to stop militants on their own.
Iraqi leaders are grappling with whether they will formally ask the Obama administration to keep a few thousand U.S. troops in Iraq beyond the military's Dec. 31 withdrawal deadline.
Talks among the leaders of Iraq's top political groups are expected to ramp up next week. But Prime Minister Nouri al-Maliki has signaled that the final decision will be left to parliament, where most lawmakers have been reluctant to embrace a continued U.S. troop presence that is unpopular with many voters.
There are currently about 44,000 U.S. troops in Iraq. There are also about 7,000 private security contractors hired by the U.S. Embassy in Baghdad to protect American government offices and residential buildings in Iraq.
Security has improved immensely since the dark days of the insurgency, but as the nearly nine-year-long war winds down, violence such as Friday's explosion still strikes with disturbing regularity. Earlier in the day, two people were killed when a bomb hidden in a trash heap exploded near a shop in Baghdad selling car parts, said police and hospital officials.
Another civilian was killed in western Baghdad when a bomb exploded near a shop selling vegetables, officials said. None of the officials wanted to be identified because they were not authorized to speak to the media.