John Brown Engineering Ltd. is in a bind.

The old-line British firm, builder of the Lusitania, the Queen Elizabeth and generations of British battleships, has a $182 million contract with the Soviet Union to supply 21 turbines for the Siberian natural gas pipeline. It wants to fulfill the contract, has more or less been ordered to do so by its government and faces the loss not only of business but also of performance bonds and possible costly court cases if it does not. But the U.S. government, which wants to block the pipeline, has warned John Brown and companies like it not to ship pipeline goods to the Soviets and has threatened them with penalties if they do.

The turbines are to be made with rotors from General Electric in the United States and are dependent to some extent on licenses John Brown holds from GE. The Reagan administration says this gives it jurisdiction over John Brown's decision.

If John Brown goes ahead with the contract, it could face millions of dollars in U.S. fines, which the government could collect by seizing assets of its 16 U. S. subsidiaries; jail terms for its officers if they set foot in the United States, and a kind of blacklisting that would prevent the company from importing further goods from the United States and could ruin its engineering operations, which depend on GE goods.

"We have no option but to comply" and fulfill the contract, Sir John Mayhew-Sanders, chairman of John Brown, said after the British government ordered compliance Aug. 2. But, he said, "It is a source of deep regret to us that compliance with a British government order and our decision to try to honor legally binding commitments should in any way appear to put this company at the center of an international political difference of views."

The pipeline is the No. 1 sore spot in the United States' current ragged relationship with Europe. The Europeans look on the project mainly in economic terms, as a source of jobs and eventually energy. The Reagan administration has moved to block it for ideological or political reasons, in retaliation for last winter's imposition of martial law in Poland. The administration also fears the fuel line will increase European dependence on the Soviet Union while helping the Soviets earn needed cash.

So far the two sides have just argued, with the indignant Europeans saying the United States has no business poking into their affair. But John Brown, in fulfilling its contract, intends to send the Soviets six turbines containing GE rotors by the end of August. Then the Reagan administration will have to act.

Decisions on the penalties to be imposed on John Brown or other defiant companies are expected to come from the White House, after consultation with the State Department, where Undersecretary James L. Buckley has been the leading defender of the sanctions, and the Commerce Department, where the issue falls under the jurisdiction of Lionel H. Olmer, undersecretary for international trade.

John Brown isn't alone in its dilemma. The president, who in December banned exports to the Soviet Union of American-made oil and gas equipment or technology, in June expanded his order to include sales by overseas subsidiaries of U.S. firms and foreign companies producing such goods under U.S. licenses.

The United States asserts that it has authority over foreign subsidiaries through their United States parents and over foreign companies manufacturing goods under U.S. licenses because such companies must pledge to abide by U.S. export laws to obtain licenses.

Among the companies affected are Italy's Nuovo Pignone, which had agreed to sell the Soviets 19 compressor stations for $650 million, Germany's AEG Telefunken, which has a $270 million contract to build pipeline turbines, and Alsthom-Atlantique, a subsidiary of the French government-owned electric company, with a $60 million contract to supply 40 spare rotors.

The Commerce Department estimates that the June extension of the pipeline sanctions could cost $1.6 billion over the next three years, affecting more than 16 overseas subsidiaries of U.S. firms and eight foreign licensees.

Those companies find themselves in the middle of not only an international political dispute but also a raging international legal battle.

Great Britain, Italy, and France have said they will order their companies to fulfill their commitments. West German Chancellor Helmut Schmidt, terming the conflict a "family dispute," has said his government will not take such drastic measures but rather "encourage" companies there to honor their contracts.

"Whose laws do we break?" asked Ronald G. Turner of California-based Baker International, whose British subsidiary has about $10 million in oil and gas equipment ready to ship and an additional $15 million in sales at stake. With the equipment due in September, he said, "We're not up against a wall right now, but we could be" if neither government backs down.

Another such company is Cameron Iron Works of Houston, which has a $100 million contract with the Soviet Union for oil and gas well equipment that it says is unrelated to the pipeline. Cameron sidestepped the December prohibition against direct trade with the Soviets by contracting through its German subsidiary and having subsidiaries in Germany, Scotland and France assemble the equipment.

Deliveries were scheduled to begin in July. "The big work is done, we've spent a lot of money, and we have still more that's committed," Cameron Chairman M.A. Wright said. "We're one of the needlessly harmed companies caught in the middle."

Cameron is facing the loss of its contract (about 10 percent of its annual sales), several hundred thousand dollars in cancellation charges and potentially huge liabilities to the Soviets and subcontractors for losses they would incur as the result of a cancellation, along with any sanctions the United States might impose.

"Have you read what the penalties could be?" Wright asked. "I'm not looking with great favor on making the decision."

Still, Wright will have to decide soon. "We're working under a very short time frame," he said. "We just don't have time for the Polish situation to get solved in a matter of months."

The legal situation of Cameron and the other companies affected by the sanctions is murky.

"Neither the Congress nor the executive lightly subjects transactions abroad to U.S. rules and the risks of conflict with local law," Olmer told a House hearing last week.

With the pipeline sanctions, however, "the necessary links to the U.S. are present, and sufficiently important U.S. interests are at stake," he said, noting that the United States exerted similar power in the seizure of Iranian assets, the response to the Arab boycott of Israel and the ban on exporting high-technology items to Libya.

"We have the legal authority to carry out the president's policy," Olmer said, "and we are prepared to enforce the controls to the extent necessary."

The Europeans and the affected companies, however, argue that the host country, not the United States, has authority over companies incorporated under foreign laws. The law the administration invoked to support the sanctions, the Export Administration Act, gives the United States power only over American exports, they contend, not continuing ability to control exported products once they are overseas.

Even if the United States wielded such authority, they add, it cannot apply it retroactively, forcing companies to comply with export bans imposed months after they signed binding contracts.

The sanctions, British Trade Secretary Lord Cockfield said in announcing the government order, are "an attempt to interfere with existing contracts" and "an unacceptable extension of American extraterritorial jurisdiction . . . repugnant in international law."

Arthur T. Downey, former Commerce Department deputy assistant secretary for East-West trade and a Washington lawyer representing several of the companies involved, said the best way to look at the U.S. decision was from the other end.

"Consider the reaction in the United States if the French government asserted that an American company was . . . 'subject to the jurisdiction of France' and ordered that it not export its products ."

Former undersecretary of state George W. Ball put the matter more bluntly. "Nothing could be more harebrained than for the Reagan administration to attempt countermeasures as it is talking of doing," he said. "For our government to reach its long arm into foreign countries and try to force local subsidiaries to disobey the policies of the countries where they are domiciled undercuts the vitality--even the existence--of the whole multinational system."

Administration officials last week downplayed the possibility of throwing corporate officials in jail. They emphasized instead their power to put companies that violate the trading ban on a blacklist that would bar them from buying goods or technology in the United States.

That sanction might be particularly effective, since many of the companies involved are dependent on products or licenses from GE and other companies for much of their manufacturing operations.

But it would also further tilt the balance of trade in favor of Europe and inflict extra damage on American firms, which have already lost at least $850 million as a result of the December sanctions, according to State Department figures.

"We shoot with this rubber gun where the barrel is turned at us," Downey charged.

It seems inevitable that the issue will end up in court. Administration officials, in what may have been wishful thinking, expressed hope last week that no conflicts would occur.

But former Commerce Department official Stanley J. Marcuss, a Washington lawyer, said, "Any company in the chain of companies that's involved in production for the pipeline is going to be concerned about any company in that chain not fulfilling their commitment. And that concern itself can translate into a lawsuit." CAPTION: Map, The Commerce Department estimates that the June extension of the pipeline sanctions could cost $1.6 billion over the next three years. By Richard Furno -- The Washington Post; Chart, MAJOR WESTERN EUROPEAN PIPELINE CONTRACTS AFFECTED BY SANCTIONS