Jordan has decided to allow the discreet stationing of U.S. troops here to man air defenses, the launch of search-and-rescue missions from its airfields and the passage of allied planes across its airspace in any war with neighboring Iraq, according to Jordanian officials and diplomats.

The Jordanian willingness to cooperate, although limited, marks a dramatic reversal of the neutrality proclaimed by the late King Hussein in the 1991 Persian Gulf War. It could prove important to any U.S. attack if it means warplanes could overfly Jordan from aircraft carriers in the Mediterranean Sea on the way to bombing runs over Iraq.

Jordanian officials have said no invasion can originate from Jordan, which borders western Iraq, and that the United States has yet to make formal requests for cooperation in the event of hostilities. But in interviews, they said all assistance would be provided short of "the apparent physical presence of troops."

"Definitely, we will be helpful," said a senior Jordanian official, speaking on condition of anonymity. "But we cannot say bring 10,000 troops and march from Jordan to Iraq. That could be disastrous, and the Americans appreciate this."

Added a former Jordanian official who maintains contacts with the government: "We are fully with the Americans."

The tacit agreement culminates a growth in U.S.-Jordanian military cooperation, buttressed by increases in military aid, joint training and personal contacts. Those relationships are underpinned by King Abdullah, a former soldier who, according to officials, made a decision in August after visiting Washington not to repeat his father's decision, one widely denounced in the United States then as a tilt toward Iraq.

At the time, Jordan was overwhelmingly dependent on Iraq for trade and oil. Popular sympathies rested with Iraq and its president, Saddam Hussein. To varying degrees, those considerations remain today. While Jordan is less dependent on Iraq economically, the small desert kingdom still imports all its oil from Iraq -- half of it free, half of it subsidized -- and the mood remains distinctly in Iraq's corner even if sympathy for Hussein is markedly less pronounced.

But most Arab governments are loath to alienate the United States, despite almost universal opposition to a war and popular resentment of U.S. policy in the Middle East, analysts say. Jordan, in particular, views its alliance with Washington as its primary strategic relationship. Another senior official acknowledged that the country is "walking a tightrope," but he and others made clear they would risk some backlash in pursuit of closer ties with the United States.

"The Jordanians, with the alliance, have put themselves in a position where they basically have no other choice," said Mustafa Hamarneh, director of the Center for Strategic Studies in Amman, the Jordanian capital.

A senior Jordanian official said his country expects the United States to deliver two, and possibly three, Patriot antimissile batteries to defend against any Iraqi attack. Although the deal has not been announced, the official said they would arrive within three weeks. A foreign diplomat, speaking on condition of anonymity, said hundreds of U.S. troops would be needed to run them.

The agreement was reached in meetings in Amman last week that Army Gen. Tommy R. Franks, chief of the U.S. Central Command, held with Abdullah and the Jordanian chief of staff, Gen. Khaled Sarayrah, officials said.

For at least two years, the Jordanian government had negotiated with Russia to purchase an air-defense system. But it turned to the United States about six weeks ago after concluding that Russia could not supply the batteries by February, when many in Jordan believe a U.S.-led war with Iraq will begin, the official and another diplomat said. The government's fears, made public over the past week, seem to stem from a sense of vulnerability left from 1991. Of the 39 Scud missiles that Iraq fired at Israel then, the U.S. military believes eight fell in remote regions of Jordan, although they caused no damage or injuries, diplomats said.

But to protect Amman against an attack or an errant missile, the government must place the batteries to the east of the city, making the presence of U.S. troops "relatively visible," a diplomat said.

Jordanian officials said they believed other forms of cooperation would be easier to mask.

Diplomats and officials said they doubted Jordan would officially acknowledge granting U.S. forces permission to fly over Jordanian territory. Officials said, however, that they would permit a military hospital and search-and-rescue missions in eastern Jordan, where the country's 100-mile border with Iraq runs through a largely inaccessible and sparsely populated desert.

"I don't think it's difficult to conceal," a diplomat said. "We're talking about a small footprint."

Search-and-rescue missions would require the presence of U.S. Special Forces troops, along with helicopters and planes. One Jordanian official would not say whether the units' responsibilities could be broadened to include missions inside western Iraq. But he did not rule it out. "We'll cross that bridge when we come to it," he said.

A diplomat said the number of such troops could be kept in the dozens.

The United States has told Israel that, at the start of any war with Iraq, it would deploy Special Operations forces in western Iraq to destroy facilities that could be used to launch Scud missiles, U.S. and Israeli officials have said.

Last October, more than 1,000 U.S. Special Operations troops trained in Jordan with troops from Jordan, Oman, Kuwait and Britain. The exercise, called Early Victor, focused on covert missions such as operating behind enemy lines. Already, Jordanian special forces are operating along the frontier, fortifying the border and digging wells to cope with refugees, one diplomat said.

The military is also upgrading an air base near Azraq ash Shishan, in eastern Jordan. Construction of a new runway and shelters for military planes is underway, but the contractor in charge of the project, Mehdi Saifi, said in an interview that the work will not be completed until May at the earliest, at a cost of between $10 million and $11.4 million. "They are interested in finishing it as soon as possible, but I can't draw any connection," he said.

Like Turkey, Iraq's neighbor to the north, Jordan expects an increase in economic aid to offset the havoc a war could cause, officials said. In addition to oil, Iraq accounts for 20 percent of Jordan's trade. Although the United States has emerged as Jordan's second-biggest partner -- it accounts for nearly 19 percent of trade and is expected to surpass Iraq within three months -- officials worry that Jordan's struggling economy, from tourism to trucking, could reel from a prolonged conflict.

"You do the math; the math is clear," said Salah Eddin Bashir, the minister of industry and trade.

A senior official said the government has received informal promises of an additional $150 million in economic aid this year, although diplomats said no agreement had been reached. Over the next three years, the official said, Jordan would receive increases in economic and military aid over current totals. In 2002, Jordan received $460 million in economic and military aid.

The United States has also asked Kuwait, the United Arab Emirates and Saudi Arabia to help supply Jordan with oil, officials and diplomats said. Kuwait and the UAE agreed but have not come to terms, one official said. Saudi Arabia has been more reluctant. But in a war, officials and diplomats said, they would expect Persian Gulf states to provide at least some assistance.

Virtually none of the military cooperation has been discussed publicly, and Prime Minister Ali Abu Ragheb last week repeated the government's official position that no war could be launched from Jordan's land or airspace. But privately, officials said they are less concerned about the outbreak of war than its duration.

If it lasts more than three weeks, they said, resentment among a population already angry over Israeli actions in the West Bank and Gaza Strip and U.S. support for Israel could create problems. The government has sent clear signals to opposition parties and unions that it will not tolerate large protests.

"More than three weeks, maximum a month, you start to get into the unknown and uncertainty," one senior official said.

King Abdullah has nurtured military cooperation with the United States, a reversal from the neutrality observed in 1991 by his father, King Hussein.