Mortar shells slammed into an Interior Ministry prison on Monday, killing at least seven inmates and wounding 23, police and a hospital official said. Separately, a fire broke out at one of Iraq's main oil refineries, but the U.S. military said it was due to an "industrial accident," not an attack.

Iraq's foreign minister, meanwhile, said a new security pact with the United States would set a time limit on the American troop presence, saying the government's eventual goal was "to reach a level of preparedness that leaves us with absolutely no need for foreign forces to remain in the country."

The mortar rounds hit a prison made up of several cell blocks, each containing prisoners accused of terrorism-related crimes or civil offenses, police said.

Police said American troops sealed off the area around the main Interior Ministry compound on the east bank of the Tigris River in central Baghdad. The U.S. military said it had no immediate information, and Iraqi Interior Ministry officials could not be reached for comment on the attack, which struck about 200 meters (yards) away from the main ministry building.

A hospital official said the inmates were sleeping when the mortars hit, one landing directly on a cell and two others nearby. Casualties were sent to a hospital inside compound for treatment, the official said, speaking on condition of anonymity because he was not authorized to release details of the attack.

Black smoke billowed into the air for hours after the fire broke out at the Dora refinery, which was built in the 1950s and is the country's oldest. One of three main refineries in Iraq, the Dora facility — like most of the industry — is operating at half capacity because of pipeline attacks since the 2003 U.S. invasion, said Assim Jihad, a spokesman for Iraq's Oil Ministry.

Jihad said he could not comment on the latest information from the U.S., but said when he was at the refinery earlier, officials there had confirmed an attack.

Both he and the U.S. military initially said the southern Baghdad plant had come under indirect fire, the military term for mortars or rockets. But the U.S. later issued a statement saying American forces had determined that the fire "was the result of an industrial accident."

"The fire, which began around 9 a.m., was initially believed to have been started by indirect fire, but when units of the 4th Infantry Brigade Combat Team, 1st Infantry Division arrived on the scene, its cause was determined to be the result of a pipe explosion," it said, adding that "the exact number of casualties is unknown at this time."

Jihad said the plant was still operating. He said a few firefighters and a refinery employee suffered from breathing problems after trying to extinguish the blaze.

Iraq's oil industry has come under repeated attack since the war began, including on Friday when a bomb exploded beneath a key pipeline outside the northern city of Beiji, home to the country's largest refinery.

According to Oil Ministry figures from July, the industry suffered 159 attacks in 2006 by insurgents and saboteurs, killing and wounding dozens of employees and reducing exports by some 400,000 barrels a day. Such attacks have cost Iraq billions of dollars since the 2003 U.S. invasion.

Iraqi Foreign Minister Hoshyar Zebari said Iraq had formally requested U.N. authorization for the U.S.-led presence in Iraq.

"We left an underline that the Iraqi government hoped that this would be the last extension of the mandate," he said, adding the negotiations for a new pact with the Americans would be "the most important that Iraq has ever entered."

He said the deadline for reaching an agreement was July: "There will be negotiations about the conduct of these (U.S.) troops and their rights, privileges and also questions of command and control."

Zebari also said U.S. and Iranian experts would meet Dec. 18 to discuss security issues ahead of an expected round of formal talks on Iraq's stability. He said both sides agreed to a fourth round of ambassador-level talks in Baghdad, but the timing was under discussion.

Previous sessions ended inconclusively with Iran rejecting U.S. allegations that it supports Shiite insurgent groups in Iraq by providing bomb-making materials responsible for the deaths of American troops.

Violence has declined sharply in Iraq since June, when the influx of American troops to the capital and its surrounding areas began to gain momentum. Baghdad has seen some of the most dramatic improvements, but deadly attacks persist throughout the country.

On Monday, a roadside bomb targeting a police patrol in eastern Baghdad killed one policeman and injured five other people, police and hospital officials said.

And on Sunday, in a Shiite region about 60 miles (100 kilometers) south of Baghdad, a roadside bomb struck a convoy carrying a popular police chief with a reputation for cracking down on militias and resisting pressure from religious and political groups to release favored members.

Hundreds marched along dusty roads to mourn Brig. Gen. Qais al-Maamouri, the police chief of Babil's provincial capital of Hillah, chanting and firing guns into the air.

At least two Islamic militant Web sites on Monday called al-Maamouri a brutal, anti-militant figure and broadcast old audio clips of the slain al-Qaida in Iraq leader Abu Musab al-Zarqawi describing him as "God's enemy."

"We swear to God that no one like him can remain alive," said al-Zarqawi, who was killed in a U.S. airstrike in 2006.