Updated

The U.S. will not "walk away" from the challenge of Iran's stepped-up arming of Iraqi insurgents who are targeting and killing American troops, U.S. Defense Secretary Leon Panetta said Monday.

"We're very concerned about Iran and the weapons they're providing to extremists in Iraq," he told a small group of soldiers on his first visit to Iraq as Pentagon chief.

"We cannot sit back and simply allow this to continue to happen" he said. "This is not something we're going to walk away from. It's something we're going to take on head on."

Panetta said Iraq must more aggressively go after the Shiite militias that are using what he called Iranian-supplied weapons.

Three rockets fired from a mainly Shiite neighborhood hit Baghdad's Green Zone during Panetta's visit, Iraqi police said. No casualties were reported.

Panetta was visiting the U.S. military's Camp Victory on the capital's western outskirts at the time of the attack on the Green Zone, the heavily secured district in central Baghdad that is home to the U.S. and other embassies as well as Iraqi government offices.

In his pep talk to the troops on the sprawling compound outside of Baghdad that houses the U.S. military headquarters, Panetta appeared to slip on the politics of the Iraq war, which was started by the Bush administration in March 2003 on grounds that then-ruler Saddam Hussein had weapons of mass destruction. Some in the Bush White House also suggested a Saddam link to the Sept. 11, 2001, terrorist attacks on the U.S. by al-Qaida -- a connection that President Barack Obama and other Democrats have called wrong and unproved.

Panetta told the troops he is firmly focused on ensuring that al-Qaida never again is able to attack the U.S. homeland.

"The reason you guys are here is because on 9/11 the United States got attacked," he said.

Asked later to explain that remark, he said he was not talking about the rationale for the U.S. invasion of Iraq but instead the need to go after al-Qaida in Iraq once it developed a lethal presence in the country following the invasion. He has said there are about 1,000 al-Qaida fighters in Iraq. That compares with an estimated 50-100 in Afghanistan, where Osama bin Laden's group was sheltered by the Taliban until the U.S. invaded Afghanistan.

Panetta will also huddle with the top U.S. military and diplomatic representatives in Baghdad before meeting with Iraqi leaders to discuss the possibility of keeping some U.S. troops in Iraq beyond 2011. He will also press Iraq for stronger action to stop stepped-up attacks on U.S. forces.

Panetta is meeting separately with Army Gen. Lloyd Austin at his headquarters outside Baghdad and with Ambassador James Jeffrey.

Later, he talks to Prime Minister Nouri al-Maliki and President Jalal Talabani.

The Obama administration believes Iraq needs a slimmed-down U.S. military presence beyond 2011, when virtually all U.S. troops are scheduled to depart. Many Iraqi leaders agree, but they've been unwilling to make a formal request.

There are now 46,000 U.S. troops in Iraq.