New Pentagon chief Leon Panetta made his first visit to Iraq as defense secretary Sunday to address several flare-ups in a fading war, including a rash of attacks on U.S. troops and continued indecision about whether the United States will completely withdraw its forces by the end of the year.

Unlike some senior Obama administration officials, who have made clear that they would like the Iraqi government to invite thousands of U.S. troops to stay in the country, Panetta demurred when asked if he favored the idea but said he would press Iraqi leaders to make up their minds.

“I’ll encourage them to make a decision so that we know where we’re going,” he told reporters traveling with him on a tour of the war zones in Afghanistan and Iraq. “If they do make a request, we ought to seriously consider it.”

Obama has pledged in an agreement with the Iraqi government to withdraw the remaining 46,000 U.S. troops in the country by Dec. 31.

At the same time, U.S. officials have said that Iraq could benefit from continued military assistance to bolster its air defenses, conduct training and mount counterterrorism operations. For that to happen, however, Iraq would have to make a formal request before the end of the year for at least some U.S. troops to stay.

“There’s some urgency for them to make that request if they’re going to make it,” said a senior U.S. defense official, speaking on the condition of anonymity to discuss internal deliberations. “Our point to the Iraqis is if you’re going to ask, you should ask us sooner because our ability to actually come through on a request is higher now than it will be in September, October, November.”

Discussions about whether to extend the U.S. military presence in Iraq come as insurgents have escalated their attacks, shattering a period of relative quiet in recent months. A U.S. service member was killed Sunday in southern Iraq, bringing to 18 the number of American troops killed since June 1 — the highest level in two years.

Panetta and other U.S. officials have blamed many of the attacks on Shiite militias backed by Iran, saying it is no coincidence that the insurgents have become more active as the U.S. withdrawal date nears.

“Iran’s motivation itself in trying to stir the pot might also be to try to intimidate the Iraqi government in the context of any conversations they might be having with us about our long-term security relationship,” the senior U.S. defense official said.

Panetta is scheduled to meet with Iraqi Prime Minister Nouri al-Maliki and President Jalal Talabani. He will also continue to introduce himself to U.S. military leaders and troops as part of his inaugural tour of the Afghan and Iraqi war zones as defense secretary. He took office July 1 after serving as director of the CIA for 21 / 2 years.

Panetta’s visit to Iraq comes as insurgents continue targeting U.S. installations in Baghdad. On Sunday, two rockets hit the city’s Green Zone — home to the U.S. Embassy and military bases — and four rockets struck the area Saturday. No casualties were reported from those attacks. On Thursday, two U.S. soldiers were killed when a roadside bomb detonated near an entrance to Camp Victory, the largest U.S. military base in Baghdad.

The secretary’s visit also follows fresh statements from the influential Shiite cleric Moqtada al-Sadr, whose political bloc last year provided the support needed to give Maliki a second term. In a statement posted late Saturday on his Web site, Sadr said he is “freezing the activities of the Mahdi Army” — a group that fought frequently with U.S. forces at the height of the Iraq war in 2006 and 2007 — even if American forces stay beyond December.

But Sadr said his Promised Day Brigade, a more elite unit established in 2008 to target U.S. troops, would continue operating if U.S. troops stayed in the country.

Sadr last month thanked his followers for offering to launch attacks on U.S. forces and earlier this year vowed to “escalate armed resistance” if the United States didn’t pull out troops as scheduled.