Updated

A vegetable truck rigged with explosives blew up Friday outside a Shiite (search ) mosque northeast of Baghdad, and gunmen sprayed automatic fire into a bakery in a Shiite district of the capital in sectarian violence that killed at least 23 people.

The attacks occurred as election officials announced provisional final results from the Jan. 30 elections for provincial councils in 12 of the 18 provinces, showing Shiite religious groups winning handily over secular tickets in local races in much of the country.

Final results from the more closely watched national race for the 275-member National Assembly are expected in a few days. A Shiite-dominated ticket endorsed by the clergy is also leading in the national contest, indicating the growing influence of religion in the politics of the new Iraq.

Defense Secretary Donald H. Rumsfeld (search) made a surprise one-day visit to Mosul (search ) and Baghdad, hailing what he called progress in Iraqi security forces after seeing some of them in training. But he said it was too soon to discuss when U.S. troops could begin coming home.

An American soldier from Task Force Baghdad was killed in a bombing Friday west of the capital, the U.S. military said. More than 1,450 U.S. service members have died in Iraq since the March 2003 invasion.

In other violence:

_ A homicide driver rammed a U.S. Bradley Fighting Vehicle and exploded in Salaheddin province north of Baghdad, injuring three soldiers, the military said.

_ Two Iraqis were killed by a roadside bomb near Tal Afar in northern Iraq, the U.S. military said.

_ Two other Iraqi civilians were killed during a clash between U.S. troops and insurgents in Mosul.

_ U.S. Marines killed two insurgents during an attack Friday night on a Marine position near Husaybah along the Syrian border, the military said.

Overall, at least 31 people were killed Friday, including 23 in the two sectarian attacks.

The bombing outside the Shiite mosque took place in Balad Ruz, 45 miles northeast of Baghdad. A pickup truck loaded with vegetables exploded just as worshippers were leaving prayer services. At least 12 people were killed, according to police Col. Tahseen Mohammed.

In the attack on the bakery in the Shiite area of eastern Baghdad, gunmen in several cars blocked the street in front of the shop and stormed inside, shooting and killing 11 people, police said. The assailants escaped.

The attack appeared to fit a pattern of brutality by Sunni extremists against Shiites as the majority community stands on the verge of taking power as a result of the elections.

The country's most feared terror leader, Abu Musab al-Zarqawi, has accused the Americans of manipulating the elections to install Shiites and Kurds in power. More than 70 Iraqis, many of them police and soldiers, have been killed in the last three days.

Many Sunni Arabs, who form the core of the insurgency, are believed to have stayed away from the polls, either out of fear of insurgent reprisals or opposition to an election with tens of thousands of U.S. and other foreign troops on Iraqi soil.

A U.S. official, speaking on condition of anonymity, said turnout in the insurgency stronghold of Anbar province was believed to be "in single digits," although no figures have been released from that area.

On Friday, the election commission released what it said were final results and turnout figures from local races in Baghdad and 11 other provinces, most of them predominantly Shiite or Kurdish.

Turnout in Baghdad for the local races was 48 percent, despite long queues in Shiite and religiously mixed neighborhoods. Polling centers in the heavily Sunni neighborhood of Azamiyah never even opened.

The biggest turnouts reported Friday were from two Kurdish provinces — Dohuk with 89 percent and Sulaimaniyah at 80 percent. The lowest figure — 34 percent — came from Diyala, which is home to Sunnis, Shiites and Kurds. Diyala includes the town of Balad Ruz, where the car bombing occurred Friday.

The biggest surprise was Babil province, a mixed area that includes the insurgent stronghold known as the "triangle of death," where 71 percent of registered voters turned out.

Turnouts in the other areas ranged from 59 percent in largely Shiite Maysan province to 73 percent in the Shiite religious centers of Karbala and Najaf.

Winners in the local races are not widely known and the candidate lists do not necessarily correspond to national race tickets. However, the U.S. official said Shiite religious parties dominated in races in Basra, Iraq's second-largest city, and elsewhere.

Despite their strong showing, Shiite and Kurdish parties are under strong pressure to reach out to Sunni Arabs and offer them a role in drafting a new constitution, one of the chief tasks of the National Assembly.

Abdul-Aziz al-Hakim, head of the Shiite ticket expected to win most National Assembly seats, told Al-Arabiya television Friday that he was ready for "any dialogue with any faithful Iraqi" — including former members of Saddam Hussein's Baath Party — as long as they were not "terrorists."

The U.S. official said one proposal was to include Sunni leaders in advisory committees that would assist the assembly in drafting the constitution.

However, some leading Sunni groups have laid down tough conditions, including a demand for the United States to set a firm timetable for withdrawing its troops.

The Americans have refused to set a deadline, saying they would leave when an Iraqi force was capable of providing security and defeating the insurgents.

"Once they have that confidence, that capacity and capability, our forces, coalition forces, will be able to go home," Rumsfeld told U.S. troops in Mosul. "It is the Iraqis who will have to over time defeat the insurgency."

Sunni groups are also demanding an end to the policy of denying places in the military and bureaucracy to former ranking members of the Baath Party. Shiites, whose 1991 uprising in the south was crushed by Baath Party militias, have opposed opening the ranks of the government and military to their former enemies.