Unlike most foreigners who are stuck in Iraq and Iraqi-occupied Kuwait, about 50 American engineers and construction workers took fate into their own hands and sailed away to safety on their work barge after thousands of Iraqi troops invaded Kuwait in the pre-dawn hours of last Thursday.

As the Iraqi troops poured across the nearby Kuwait border, the Americans working to complete work on a huge oil exporting facility on Iraq's economically strategic Faw Peninsula decided the heat of the nearby war could make life more unpleasant than the intense heat and humidity of a Persian Gulf summer.

So they simply floated away into the gulf on their barge, ending up in the safety of the island sheikdom of Bahrain, 280 miles away from the Iraqi authorities who now are preventing hundreds of foreigners from leaving.

"They worked as long as they could. Then they decided to pull off," said Joseph Stevens of Brown and Root Inc., a Texas-based construction company that has been working on major projects in the Middle East for decades.

Stevens said the 50 workers sailed down the Gulf to the company's facilities in Bahrain. Stevens, speaking from the company headquarters in Houston, said the construction crew decided to pull away from the project shortly after Iraq's invasion of Kuwait.

They are luckier than other foreigners caught by the lastest Persian Gulf crisis. The State Department said yesterday that Iraq had made it clear it would not allow foreigners to leave either that country or Kuwait.

Stevens said Brown and Root was in the final stages of the construction project and had a relatively small engineering and construction crew at the site, all of whom lived on the work barge. The company had pulled away all its heavy equipment, he said.

Other industry sources said that while Brown and Root was able to get its men out of Iraq, it runs the risk of losing a "rather substantial" final payment for the job, which is almost finished. Stevens agreed there was some money due, but would not get more specific on the amount.

The Faw Peninsula is a swampy spit of land that sits on the southern tip of Iraq and is that otherwise-landlocked country's only outlet to the Persian Gulf. Before Iraq invaded Iran in 1980, starting an eight-year war, the port at Faw was the primary Iraqi terminal for exporting oil.

But the facility came under attack by Iranian planes and heavy artillery in September 1980. It was badly damaged, reducing its strategic importance to Tehran and forcing Iraq to build pipelines through Saudi Arabia and Turkey. The port at Faw was captured by Iranian forces in 1986.

In what was later seen as a turning point in the gulf war, Iraq recaptured Faw in April 1988, after a 36-hour attack that was the beginning of a major offensive. Three months later, Iran agreed to a U.N.-brokered cease fire.

Iraq President Saddam Hussein considered its reconstruction important to his country's security because of the access it provided to the Persian Gulf. Without it, Iraq is vulnerable to an embargo of the kind imposed by the United Nations, in which the pipelines through Turkey and Saudi Arabia have been shut down.