U.S. troops cordoned off the northeastern Tameem neighborhood near the mosque, a poor area of the city crowded with many homes. Civilian vehicles helped ambulance crews in ferrying casualties to hospitals.
"As we were inside the mosque, we saw a ball of fire and heard a huge explosion," said Tahir Abdullah Sultan, 45. "After that blood and pieces of flesh were scattered around the place," he added.
Rows of overturned white plastic chairs were stained in blood. Body parts, believed to be of the bomber, were spread around the area, and the smell of gunpowder filled the yard. Windows of nearby cars were shattered.
"After the cloud of smoke and dust dispersed, we saw the scattered bodies of the fallen and smelled gunpowder," said Adnan al-Bayati, another witness.
Insurgents in the past have targeted Shiite mosques and funerals.
Mosul has been a hotbed of insurgent activity and the scene of many bombings, drive-by shootings and assassinations against the country's security services, Iraq's Shiite majority and people thought to be working with U.S.-led forces.
In other developments:
In an Internet statement, a group claiming to be Al Qaeda in Iraq took responsibility for an attack in the same area on "an intelligence officer who used to investigate the Mujahedeen and hurt them." The authenticity of the statement could not be verified.
The deal between the clergy-backed United Iraqi Alliance and a Kurdish coalition will allow a new government to be named when the National Assembly opens next week.
It calls for the government to begin discussion on the return of about 100,000 Kurds to the oil-rich northern city of Kirkuk and talks about redrawing existing Kurdish regions to include the city in Iraq's new constitution.
It also gives the Kurds just one major Cabinet post — one fewer than they demanded — in return for making one of their leaders, Jalal Talabani, Iraq's first-ever Kurdish president. One ministry will go to the country's Sunni Arab minority, which largely stayed away from the Jan. 30 elections.
The Kurds agreed to back conservative Islamic Dawa Party leader Ibrahim al-Jaafari for prime minister.
As part of the deal, any land agreement will be incorporated into the country's new constitution, which must be drafted by mid-August and approved by referendum two months later.
"As for Kirkuk, we agreed to solve the issue in two steps. In the first step, the new government is committed to normalizing the situation in Kirkuk, the other step regarding annexing Kirkuk to Kurdistan is to be left until the writing of the constitution," said Fuad Masoum, a member of the Kurdish coalition, who served as head of the Iraq's former National Council.
He added that the new government "is obligated to normalization in Kirkuk, the return of deported Kurds to their main areas (in) Kirkuk."
A ranking member of the alliance who has participated in negotiations with the Kurds, held in Baghdad, said the government that will be formed after the National Assembly convenes Wednesday will deal with both issues.
"We agreed with the Kurds that these two issues are to be solved through the government and they agreed on this. ... We told them that the issues will be discussed as soon as the central government is formed," said Ali al-Dabagh, a member of the Shiite Political Council.
Kurdish demands include an autonomous Kurdistan as part of federal Iraq and a share of region's oil revenues. They also want to maintain their peshmerga militia and want a bigger share of the national budget, more than the 17 percent they now receive.
Their demand for a federal state requires redrawing their state borders to include Kurdish areas — Kirkuk among them.
They also want reversal of what they call the "Arabization" of areas such as Kirkuk. Ousted Iraqi leader Saddam Hussein relocated Iraqi Arabs to the region in a bid to secure the oil fields there.
Many of the Kurds who want to return to Kirkuk are now living in tent cities.
"With regard to the financial resources, this was solved. Kirkuk resources will be given to the government which will spend them fairly to reconstruct all provinces. As for the peshmerga, they will be joined in the security bodies, such as borders guards, local police," al-Dabagh said.
He said the Kurds had demanded to keep a local peshmerga militia force of 100,000, but that "we told them that the Defense Ministry will decide how many peshmerga are needed under the condition that there will not be a separate peshmerga unit."
The Kurds emerged as kingmakers from the elections with 75 seats in the 275-member National Assembly. The alliance has 140 and needs Kurdish support to assemble the two-thirds majority needed to elect a president, who will then give a mandate to the prime minister. Interim Prime Minister Ayad Allawi only received 40 votes.
"We told the Kurds that if they are going to have the presidency, then they could have only one major cabinet post because Sunnis should have one major cabinet post," al-Dabagh.