WASHINGTON - President Bush yesterday defended a Pentagon program to kill or capture Iranian operatives inside Iraq, saying that U.S. troops would use all necessary measures to protect themselves and Iraqi civilians from harm.

"It makes sense that if somebody's trying to harm our troops, or stop us from achieving our goal, or killing innocent citizens in Iraq, that we will stop them," Bush said in response to a question about the program.

But Bush and Defense Secretary Robert Gates both said U.S. troops would not cross Iraq's border with Iran, and the president said he was still committed to resolving the dispute over Iran's nuclear program diplomatically.

Senate Majority Leader Harry Reid (D., Nev.) said that U.S. troops must defend themselves in Iraq but that the president needed congressional approval for any program that could "escalate this conflict" with Iran. Reid said Bush should be engaged in direct diplomacy with Iran and other countries in the region to avoid a widening conflict, rather than "sending battle-carrier groups" to sit off the Iranian coast.

Last fall, Bush gave the military secret authorization to kill or capture members of Iran's Revolutionary Guards, including members of a guard unit known as the Quds Force, and any Iranian intelligence operatives suspected of arming or supporting Shiite militias in Iraq.

The policy is based on the theory that Tehran will back down from its nuclear ambitions if the United States hits it hard in Iraq and elsewhere, creating a sense of vulnerability among Iranian leaders.

But the policy has attracted some influential skeptics inside Bush administration and the intelligence community who are concerned that Iran could respond with escalation. The director of the CIA, Michael Hayden, counseled the president to consider that Iran could undertake its own program to kill or kidnap U.S. personnel in Iraq or neighboring Afghanistan.

Bush said it was "not accurate" that his goal was to widen a confrontation between the two countries.

"We're going to continue to protect ourselves in Iraq and at the same time work to solve their problems with Iran diplomatically, and I believe we can succeed," he said at a news conference. "The choice is the Iranian government's choice."

In Tehran, the chairman of the parliament's National Security and Foreign Policy Commission, Alaoddin Boroujerdi, said Bush's policy amounted to "terrorist" action that violated international law.

"Such a measure illustrates the failure of the U.S.'s new strategy in Iraq, because it has had no effect in quelling unrests and restoring calm and order and has instead roused intensified reactions in Iraq," Boroujerdi told an Iranian news agency.

At a Pentagon news conference yesterday, Gates told reporters that U.S. troops were not "simply going to stand by and let people bring sophisticated IEDs [improvised explosive devices] into the country that can disable an Abrams tank and give them a free pass." Gates was referring to roadside bombs that U.S. officials have said are built with components brought into Iraq from Iran.

"But as we've said before," he told reporters at the Pentagon, "we think we can handle this inside the borders of Iraq, and the operations are limited to inside the borders of Iraq."

Gates did not discuss the program's rules of engagement but said that U.S. military targeting was limited to Iranians who posed a threat to U.S. troops.