Outgoing U.S. Defense Secretary Donald H. Rumsfeld paid a surprise visit to Iraq over the weekend and said American forces should not quit the war until the enemy is defeated.

Just days after a U.S. bipartisan commission called the situation here "grave and deteriorating" and that the Bush administration's policy wasn't working, Rumsfeld showed no sign of backing down from his long-standing position that insurgent groups such as Al Qaeda in Iraq must be crushed to keep them away from America.

"For the past six years, I have had the opportunity and, I would say, the privilege, to serve with the greatest military on the face of the Earth," Rumsfeld, 74, said in a speech Saturday to more than 1,200 soldiers and Marines at Al-Asad, a sprawling air base in Anbar province, the large area of western Iraq that is an insurgent stronghold.

Click here for FOXNews.com's Iraq center.

"We feel great urgency to protect the American people from another 9/11 or a 9/11 times two or three. At the same time, we need to have the patience to see this task through to success. The consequences of failure are unacceptable," he was quoted as saying on the Department of Defense Web site. "The enemy must be defeated."

Rumsfeld also visited U.S. forces in Balad, 50 miles north of Baghdad, it said.

He met with U.S. commanders at the American military headquarters at Camp Victory in Baghdad on Saturday night and continued his farewell visit to U.S. troops in Iraq on Sunday, the military said.

At least 2,930 members of the U.S. military have died since the beginning of the Iraq war in March 2003, many in and around Baghdad, and in hard-hit Anbar cities such as Fallujah and Ramadi.

Meanwhile, gunmen attacked two Shiite homes in western Baghdad, killing 10 people, police said Sunday, while seven others died in clashes elsewhere in the capital. No one claimed responsibility for the attack, which occurred at about 11 p.m. Saturday in the mostly Sunni Arab al-Jihad neighborhood, two policemen said. The attack appeared to have been conducted by Sunni Arabs in retaliation for earlier attacks on Sunnis in the capital.

The policemen spoke on condition of anonymity out of concern for their own safety.

Baghdad has been suffering from a series of attacks aimed at driving Sunnis or Shiites out of neighborhoods of the capital where they form a minority.

On Sunday morning, clashes erupted between Sunni and Shiite militants in Baghdad's mixed western Amil district, a policeman said. One Shiite militiaman was killed and six people — five Sunnis and one Shiite — were wounded, the officer said on condition of anonymity because he is not authorized to talk to the media.

The clashes broke out at 8:45 a.m. when about 50 Shiite militiamen raided a Sunni neighborhood of the Janabat tribe, the officer said. The fighting ended with U.S. and Iraqi forces rushed to the area to contain it, he said.

The area is near a Sunni pocket of Hurriyah, another mixed neighborhood where fighting occurred Saturday.

Witnesses said Shiite militiamen entered Hurriyah after Sunnis warned the few Shiites living there to leave or be killed. Heavy machine gun fire was heard and three columns of black smoke rose into the sky, the witnesses said on condition of anonymity, also out of concern for their own safety.

On Sunday, hundreds of Sunnis who said that sectarian violence has driven them from their homes to seek refuge in schools, mosques and other dwellings held a demonstration in the al-Adil area of western Baghdad, demanding better protection from Iraqi security forces. The men, women and children in the demonstration marched down a street alongside a tractor carrying luggage of displaced people. Some of the protesters were hooded and carried machine guns.

Omar Abdul-Sattar, a member of the Sunni Arab Iraqi Islamic Party, said Sunday that an organized effort was under way in Hurriyah to force Sunnis out, and he accused Iraq's Shiite-led government of doing little to stop the violence.

Speaking at a news conference shown on Iraqi TV, Abdul-Sattar read a party statement claiming that during the past five months more than 300 Sunni families have been displaced from Hurriyah, more than 100 Sunnis killed and 200 wounded, and at least five Sunni mosques burned, along with houses and shops.

He said the party rejected sectarian violence of all kinds, but he accused Prime Minister Nouri al-Maliki's government of protecting Shiite areas of the capital while ignoring the needs of mostly Sunni ones.

Rumsfeld's 15th trip to Iraq since the war began followed an emotional farewell Friday at the Pentagon in Washington, where the defense secretary defended his record on Iraq and Afghanistan.

He said the worst day of his nearly six years as secretary of defense occurred when he learned of the Abu Ghraib prisoner abuse. Rumsfeld's Pentagon appearance and his trip to Iraq on Saturday were among the few public appearances he has made since U.S. President George W. Bush announced on Nov. 8 that he was replacing the defense secretary. His last full day will be Dec. 17.

Rumsfeld's farewell tour to Iraq followed a grim picture of the war that was presented last week by a bipartisan commission headed by former U.S. Secretary of State James Baker and former Democratic Rep. Lee Hamilton. The Iraq Study Group said its prescription for change is needed quickly to turn around a "grave and deteriorating" situation.

The commission called for direct engagement with Iran and Syria as part of a new diplomatic initiative and a pullback of all American combat brigades by early 2008, barring unexpected developments, to shift the U.S. mission to training and advising.

The report took direct aim at Rumsfeld, who stepped down one day after the Republicans lost control of Congress in the midterm elections.

Saying there has been a long tradition of partnership between the military and civilian leaders, the group said the "tradition has frayed" and must be repaired. It urged the new defense secretary, former CIA director Robert Gates, to "make every effort" to encourage military officers to offer independent advice.

Bush's national security team is debating whether additional troops are needed to secure Baghdad — a short-term force increase that could be made up of all Americans, a combination of U.S. and Iraqi forces, or all Iraqis, a senior Bush administration official said in Washington on Saturday.

Other options being debated include a revamped approach to procuring the help of other nations in calming Iraq; scaling back the military mission to focus almost exclusively on hunting Al Qaeda terrorists; and a new strategy of outreach to all of Iraq's factions, said the official, who spoke on condition of anonymity because the disclosure of internal discussions had not been authorized.

Click here for FOXNews.com's Iraq center.