Nothing tests a first-class hotel like its performance in times of war and places of hardship, and Pan Am's Inter-Continental Hotels have won the loyalty of globetrotting businessmen, diplomats and foreign correspondents by keeping the water hot and the white wine cold in some of the most exotic and least pleasant places on earth.

If the financially troubled airline is forced to sell its profitable hotel subsidiary, as seems likely, it will be giving up a worldwide network of luxury hostelries with a reputation for carrying on in the face of adversity, as well as making money.

Stockholders at Pan Am meetings who have urged management to "sell the airline and keep the hotels" echoed the sentiments of Americans caught in the Iranian revolution who were left stranded by Pan Am at Tehran airport but were sheltered by the Tehran Inter-Continental.

Many of the 83 hotels of the Inter-Continental group are located in outposts more renowned for hardship or violence than luxury: Dacca and Kinshasa, Beirut and Managua, Peshawar and Kingston, Muscat and Lusaka.

Others are in remote locations where electricity is erratic, food supplies questionable, or governments unstable, and where local laws and customs present unique obstacles to the operation of a luxury-class hotel. Since it owns only six of the 83 and manages the others under contract, the hotel chain has been able to limit its capital investment while expanding its reservation system and name recognition worldwide.

In Mecca, Saudi Arabia, the Inter-Continental is operated by an all-Moslem staff, because no unbelievers are permitted to enter the holy city of Islam. In Riyadh, the Inter-Continental was the first -- and for years the only -- luxury hotel. Its Lebanese-born manager, Raymond Khalife, became a master at juggling the demand for rooms from official guests, business executives and journalists.

In Jerusalem, the Arab-run Inter-Continental tailors its promotional literature to avoid mentioning what country it's in, because it is in the eastern part of the city, annexed by Israel in 1967. In Bali, Indonesia, the Bali Beach Inter-Continental for years kept its own European doctor in residence because no other medical care adequate for tourists was available on the beautiful but primitive island.

The Jordan Inter-Continental in Amman was shot up when Palestinian guerrillas storming it took Western journalists and diplomats as hostages in 1970. Seven persons -- none of them guests -- were killed there when another Palestinian group seized the hotel in 1976. Some of the rooms still show plastered-up bullet holes, but the hotel, across the street from the U.S. embassy, is putting in a 150-room extension.

In Beirut, the Hotel Phoenicia Inter-Continental was one of the prominent casualties when fighting in the 1975 civil war destroyed the city's waterfront hotel district. Most of the buildings there are still bullet-pocked wrecks, but Inter-Continental lists the Phoenicia as part of the chain, "reopening to be announced."

In Managua, during the Nicaraguan revolution in 1979, heavy fighting trapped journalists and government officials in the Inter-Continental Hotel for more than a week. The staff of 300 was reduced to 35 employes, but they kept the hotel running, providing barrack-style buffet meals of rice and meat when other food supplies ran out, and pledging to keep going when the journalists agreed to do their own laundry.

The Tehran Inter-Continental earned the affection of hundreds of journalists who found a home there during the long months of the Iranian revolution. Tehran, swept by tear gas and crippled by fuel shortages, came to a virtual halt, but manager Gary Hoagland kept the restaurants open and the taxis running. He converted two suites into a "press club" where he dispensed liquor and movies on TV cassettes, and the press corps gathered there nightly when curfew shut down the city.

In 1980, when Islamic revolutionaries destroyed the hotel's liquor and wine stocks, pouring $325,000 worth of hootch down the drain, Hoagland's successor, Hartwig Schnuppe, described them as "very polite." But Inter-Continental gave up its Tehran operation late last year after it was denounced in Tehran newspapers as a "nest of spies."