Street fighting erupted between Iraqi police and Shiite Muslim militiamen in Najaf on Thursday, shaking a five-day-old truce that had restored peace to the holy city after weeks of clashes between Shiite fighters and U.S. occupation troops.

Within hours, U.S. soldiers in the Baghdad slum of Sadr City were trading gunfire with members of the same Shiite militia, breaking several days of calm and ruining plans for a more formal cease-fire in the capital's most densely populated neighborhood. Residents said automatic rifles, machine guns and rocket-propelled grenades were heard throughout the afternoon.

The Najaf battle took place in the center of the city 90 miles south of Baghdad and did not involve U.S. soldiers, according to a senior military official. As part of the Najaf cease-fire reached last Friday, U.S. forces pledged to stay away from the downtown area and its Shiite shrines, leaving security there to U.S.-trained Iraqi police.

But the clashes showed that the Mahdi Army, the militia of Moqtada Sadr, a defiant Shiite cleric combating the U.S. occupation, has remained in Najaf as an armed force that can reemerge at will, able to challenge the freshly organized Iraqi police forces assigned to assure security and represent government authority.

As its part of the cease-fire deal, Sadr's militia had promised to avoid any open armed presence in Najaf and the neighboring city of Kufa. But it swiftly returned to the streets as soon as the fighting with police broke out in the early morning -- and just as swiftly seized the initiative, capturing a number of policemen.

The militia's quick show of force, and the police response, suggested the depth of the problems that the U.S. military faces as it seeks to have Iraqi soldiers and policemen gradually replace U.S. occupation troops in the weeks and months ahead. With sovereignty being turned over in principle to Iraqi authorities on June 30, U.S. occupation forces have become eager to reduce their role -- or at least their visibility -- in running the country.

"It still remains our aspiration to turn over security control to Iraqi forces," a senior military official said. "But this is not a calendar-driven process," he added, meaning that the turnover can happen only when U.S.-trained and -supplied Iraqi forces are capable of assuming responsibility. "This is not paternalism," he said, "this is reality."

Hospital officials in Najaf said Thursday's fighting, which broke out around midnight and lasted all morning, wounded two dozen Iraqis and killed seven, including three militiamen and four civilians. One policeman was reported wounded.

A number of Iraqi policemen were seen being taken into custody by Mahdi Army fighters, who seized a downtown police station and later turned it over to looters. After the station was emptied of furniture and equipment, it was set afire. Several four-wheel-drive vehicles with police markings were also burned in front of the torched station house.

The U.S.-appointed governor of Najaf, Adnan Zurufi, told reporters that negotiations were underway with Sadr's lieutenants to restore the cease-fire. But he said U.S. troops would be called in again if necessary.

Qais Hazali, a Sadr spokesman in Najaf, said shooting broke out after a police patrol fired on militiamen near an office of the charitable Islamic Works Organization. "What truce?" he said. "The Iraqi police started it."

Witnesses said, however, that the fighting began after militiamen challenged police seeking to arrest Mahdi Army members carrying rifles in violation of the cease-fire terms. Whatever the spark that set it off, the confrontation quickly involved several armed militia units whose fighters swiftly overpowered the police, the witnesses said.

U.S. troops and Sadr's followers in eastern Baghdad's Sadr City quarter had largely avoided clashes in the past several days, after U.S. forces pulled out of a police station they had occupied just down the street from one of Sadr's offices. The office director, a black-turbaned cleric named Hassan Adhari, had predicted the area would remain calm as long as the American soldiers stayed out of the neighborhood.

The new clashes broke out after U.S. troops in armored vehicles entered the slum's rutted streets to take someone into custody, said a well-connected resident, Ahmed Manfi. As a result, a peacemaking meeting between a prominent religious leader and U.S. officers was called off, he said.

Shiite political and religious leaders have sought to convince Sadr, the son of a revered religious figure assassinated during the rule of former president Saddam Hussein, that he should transform his militia into a political movement and take part in efforts to form a new government for postwar Iraq.

Discussions between his group and religious leaders in Najaf have been underway since the cease-fire began, but so far without result. Grand Ayatollah Ali Sistani, Iraq's most influential cleric, met with the young upstart last Saturday as part of the effort to draw him into the political process.

Vice President Ibrahim Jafari, who heads the Shiite-based Dawa party, said the U.S. decision to confront Sadr a little over two months ago because of his opposition to the occupation was a mistake. Now, after fighting that cost hundreds of lives, the way to repair the rift is to bring Sadr and his followers into the government or, failing that, persuade them to oppose the government peacefully, he said.

"If we cannot convince them to come into the government, then we should persuade them to convert to a political opposition, using the language of dialogue and not the language of arms," Jafari said in an interview. "We should not push them to the other side."

The same is true of the Sunni Muslim gunmen who have taken over Fallujah, just west of Baghdad, he said. After fighting the Fallujah militias for weeks and vowing to attack the city to bring it under control, U.S. Marines pulled back and ushered in a security force under the command of a former Iraqi general.

"The solution now is a political solution," Jafari said.

Jafari said his advice along these lines was not heeded by U.S. military commanders and the U.S. administrator of Iraq, L. Paul Bremer, when the original decisions were made to go after Sadr and try to crush resistance in Fallujah.

The U.S.-led Coalition Provisional Authority and the new interim government issued an order Tuesday declaring all Iraqi militias illegal and barring their leaders or members from holding office for three years. Sadr's Mahdi Army was left out of the negotiations that led to the order, which were underway as he fought U.S. occupation forces. As a result, his movement was outlawed, and he and his followers were banned from running for office or entering the government.

Jafari said Sadr's group may be asked to send envoys to a 1,000-member convention of Iraqi political groups that will meet next month to pick a provisional national assembly. "Any part of Iraqi society should be invited," he said.

Prime Minister Ayad Allawi, meanwhile, estimated that anti-occupation insurgents have caused $200 million in damage to the Iraqi oil industry in the past seven months, attacking pipelines and other installations about 130 times. Allawi, speaking before a government meeting in Baghdad, said those who sabotage Iraqi oil equipment were "terrorists and foreign fighters," not the anti-U.S. patriots they claim to be.

Insurgents attacked a major pipeline in northern Iraq on Wednesday as part of their campaign to shake Allawi's interim government. As a result of the damage, Oil Ministry officials estimated the country's electricity production would sag by 10 percent. Lack of electricity has been one of post-Hussein Iraq's main headaches, and one of the most important reasons for popular disenchantment with the U.S. occupation.

[The U.S. military announced on Friday that a U.S. soldier died of wounds sustained during an attack in eastern Baghdad on Wednesday, according to the Reuters news service. Four other soldiers were wounded in the attack, the news service reported, citing a military statement.]

Special correspondent Saad Sarhan in Najaf contributed to this report.