The original idea was simple: To be a first-rate economic power, the United States had to build enough cargo ships to blanket the world with American goods.

It was 1936, and the Roosevelt administration, still mired in the Depression, was also preparing for an approaching world war. The moment seemed right to begin an infusion of federal aid that by the war's end produced the world's preeminent merchant marine fleet.

But as with so many noble ideas spawned in Washington, things eventually went astray. Today the federal government, through a numbing array of subsidies, tax breaks and protectionist measures, continues to prop up an American maritime industry that is increasingly unable to compete or even to survive on the open seas.

More than $11 billion in direct subsidies and another $11 billion in loan guarantees over a half-century have failed to halt the industry's spectacular decline.

U.S.-flag ships carry less than 6 percent of American imports and exports. The number of major American liner companies has dropped from 19 to seven during the last 15 years. Nearly a quarter of the nation's shipyards have shut down since 1981, and another third are expected to vanish in the next five years.

The aging merchant fleet itself has dwindled from 5,000 active ships in 1945 to fewer than 400 today. And some of the remaining vessels are sinking financially, taking the taxpayers' money with them.

"It was never intended that we give subsidies to everything that floats, and that's what happened," said Rep. Mario Biaggi (D-N.Y.), chairman of the House merchant marine subcommittee.

But these stem-to-stern subsidies look very different to those in the industry. Although providing nearly $1 billion a year in maritime benefits may be questionable national policy, it has been a bonanza for those who know how to work the system.

A little-known Houston ship operator named C.C. Wei is one of hundreds of businessmen who have built their companies on a foundation of federal aid. But Wei is unusually creative when it comes to dealing with the government.

In the last few years, federal officials have spent millions of dollars to help finance the building of ships for the Chinese-American financier. They have awarded him lucrative subsidies to run the ships. They have given him subsidies to haul government grain to Africa. They have leased his ships and hired his crews for the Navy. And they have allowed him to put some of the proceeds in a tax-exempt government fund.

Wei, a world-class bridge player, has dealt out some of these subsidy rights to other players, or cashed them in for other benefits when the price was right. And, like any good card player, he knows how to cut his losses. Wei follows the industry practice of setting up a separate corporation for each ship, so if one vessel sinks into debt it does not jeopardize the rest of his business.

This practice protected Wei last spring when his two largest ships, the Jade Phoenix and Golden Phoenix, went bankrupt. But the Maritime Administration, which guaranteed the loans on the ships, was not so lucky. It had to absorb a $135 million default -- the largest in its history -- that wiped out a government reserve fund set aside for ship bankruptcies.

On Friday, the Maritime Administration had to borrow $25 million from the Treasury to pay off federally backed loans on 50 barges and two drilling rigs that have gone bankrupt. Such defaults are expected to continue at a record pace as the industry remains mired in a worldwide shipping slump.

This is a tale that parallels the erosion of U.S. leadership in steel, automobiles and textiles, replete with trade barriers, buy-American rules and unionized inefficiency. The result is a fleet of ships that is so expensive to build and operate that Americans have priced themselves out of the world market.

President Reagan, while spending billions of dollars on the Navy's military buildup, has tried to stem the growth of commercial ship subsidies. But critics say the administration has no coherent strategy to salvage an industry that is vital to national defense.

Even many supporters concede that the patchwork of aid programs born under the 1936 Merchant Marine Act has failed. But Congress, under conflicting pressures from commercial interests, cannot decide how to respond.

There is plenty of blame to go around: American shipyards are so noncompetitive that since Reagan ended a 44-year-old program of direct construction subsidies in 1981, only a handful of commercial ships have been built in this country. For reasons ranging from high union wages to obsolete yards, U.S. shipbuilders charge three times as much as their leading competitors in Japan and South Korea. American ship operators are so noncompetitive that most could not carry coal, grain, oil and other commodities without federal operating subsidies. Since 1970, these subsidies have ballooned from an average of $650,000 to $3.5 million per ship each year. They compensate U.S. firms for labor costs that are at least double those of European competitors and many times higher than those of Chinese ships. Every time an American freighter makes a voyage, it receives a cash subsidy that enables it to offer shipping rates comparable to those of foreign competitors.

Many U.S. operators would go broke without longstanding protectionist laws. Under the Jones Act, for example, all shipments between U.S. ports must be carried on U.S.-flag ships, while cargo-preference laws reserve half of all government freight for U.S. vessels. American maritime unions are so noncompetitive -- some master seamen receive $170,000 a year in pay and benefits -- that they have lost 40 percent of their ocean-going membership in the last four years. Some unions have been forced to make major concessions in pay and benefits just to keep their members working.

For more than three decades, federal subsidies went mainly to the big shipping lines that sailed fixed routes. But in 1970 Congress threw open the doors to nearly all vessels, including the kind of bulk cargo ships run by C.C. Wei, which are put up for hire on a charter basis.

Wei rarely gives interviews or makes public appearances, preferring to run his interlocking network of companies behind the scenes. But experts say he has an uncanny ability to arrange big shipping deals with little investment on his part.

After coming here in 1942 to work for Chiang Kai-Shek's Nationalist Chinese government, Wei launched his maritime career by helping to get oil from the Middle East to Taiwan. He has been a ship company owner since 1960, and his wife, Katherine, is a favorite bridge partner of Chinese Vice Chairman Deng Xiaoping.

"He's not really a ship operator, he's a financier," said a former federal official who knows Wei. "He always had a low profile. But as far as pulling together the capital required to finance a ship, he's very good."

Another former agency official said Wei generally doesn't "put a nickel of his money into anything, but he's managed to maximize the benefits from all the maritime programs . . . . Any program that's been available to American-flag vessels, he's gotten the benefits from."

William E. Haggett, chairman of Bath Iron Works in Maine, called Wei "bright, fair and able. He was very firm in his business dealings with us."

Neither Wei nor anyone from his Falcon Shipping Group would agree to be interviewed. Former Maritime administrator Robert Blackwell, who represents Wei, also did not respond to inquiries.

From 1972 to 1981, the Maritime Administration provided $203 million in direct construction subsidies to build 11 ships eventually owned and run by Wei. The government picked up almost half the construction tab on some of these ships, the legal maximum.

Nine of the ships were also backed by so-called Title 11 loan guarantees, a program in which the Maritime Administration guarantees private bonds that are floated to build ships.

There is a quid pro quo in both programs. The ships must be built in U.S. yards; they must use U.S. steel, engines, pipes and other materials, and they must employ U.S. crews -- all of which would be prohibitively expensive without the subsidies.

Wei's most controversial ships, the Jade Phoenix and Golden Phoenix, were launched with construction aid and loan guarantees, but hat was only the beginning.

The two vessels and a sister ship were originally built for the El Paso Co. as liquid natural gas tankers. But when they were finished in 1979, inspectors discovered thousands of tiny insulation cracks that rendered them useless to carry liquid fuel. The maritime agency received a record $300 million insurance settlement from Lloyd's of London and was expected to pay off the bondholders.

In late 1981, soon after Harold E. Shear became Maritime administrator, Wei came forward with an ambitious plan to take over the three ships and convert them to dry cargo carriers. The agency agreed to allow Wei to make the repairs in a Japanese shipyard, although the original subsidies were meant to finance U.S. construction.

Days after the plan was approved, one of the ships, the Columbia, ran aground in a storm and was damaged beyond repair. A third of the $300 million insurance fund was used to pay off the bondholders, and the rest went toward converting and operating the two Phoenix ships.

That was only part of the deal. Wei also sold the tax benefits on the two ships for millions of dollars to Atlantic Richfield Co. under Reagan's now-defunct tax leasing program.

Still, the debt-laden vessels were too large to be accommodated by many world ports and too expensive to find much work. So Wei turned to another federal subsidy program: Food for Peace.

Half of these government food shipments are reserved for U.S. vessels under the cargo-preference laws. The Agriculture Department pays U.S. operators enough in subsidies to let them match the lower rates charged by foreign ships.

The Phoenix ships won several contracts to ferry wheat to Egypt and Sri Lanka, although the huge vessels often traveled more than half-empty. On a typical voyage, the Golden Phoenix charged the foreign nations $58 a ton, then received a subsidy -- called an ocean freight differential -- of $39.24 a ton. Total subsidies for the Phoenix ships last year were $7.3 million.

Despite this government work, the Maritime Administration had to make $9 million in mortgage payments on the Phoenix ships when Wei couldn't come up with the cash. But when the latest installment came due in May, the agency gave up and absorbed the $135 million bankruptcy, leaving just $9 million in its reserve fund for future Title 11 defaults. The fund ran dry on Friday.

Three of Wei's newer tankers -- the Pride of Texas, Spirit of Texas and Star of Texas -- are also awash in subsidies. They were built with $61 million in construction subsidies, nearly half their cost. They were backed by Title 11 loan guarantees to protect their bondholders. And when the tankers were finished in 1981, the Maritime Administration approved operating differential subsidies so they could compete with foreign ships.

Operating subsidies are worth $3 million a year or more for a fully employed ship. But anyone who receives these subsidies is permanently barred from receiving similar subsidies from the cargo-preference programs. And Wei apparently decided that the three tankers would be better off carrying government grain.

Fortunately for Wei, Rep. Gene nyder (R-Ky.), ranking Republican on the House merchant marine subcommittee, had just pushed through an amendment that happened to fit his situation.

The measure enabled Wei to forgo the operating subsidies temporarily, in effect trading them in for the right to enter the Food for Peace program and receive the subsidies it offers. The ships got $3.2 million in Food for Peace subsidies last year to carry wheat and flour to Egypt, Morocco and Sri Lanka. Only three other ships have utilized the Snyder amendment, which also involves repaying a part of their construction subsidy.

Wei's partners hailed the amendment in a letter to Snyder, saying that in their case it was "producing substantial savings to the U.S. government."

The Pride of Texas also took advantage of an unwritten subsidy arrangement. The government of Israel, in exchange for U.S. aid, has agreed to ship half the grain it buys here on U.S.-flag ships. The Israelis hired the Pride of Texas to import corn and soybeans in 1981 and 1982 and paid the freight differential on the two voyages. An Israeli spokesman said this arrangement costs his government up to $30 million a year in higher freight costs.

Wei's novel methods extend to other subsidy programs. In 1981, Congress tried to give U.S. shipping companies a boost by allowing them to build ships more cheaply abroad and remain eligible for operating subsidies. Congress approved a yearlong "window" for companies to win this one-time benefit.

Days before the program expired on Sept. 30, 1982, the Maritime Administration approved a two-paragraph application by a Wei company, Equity Maritime, to build six tankers in Japan and South Korea. But Wei never built the tankers. Instead, in a highly unusual transaction, he recently sold the subsidy rights on three of the ships to American President Lines, a major shipping company. One maritime lawyer who dealt with Wei said the financier was asking $2 million for the subsidy rights on each ship.

The maritime agency's approval of the deal drew stiff protests from two competing liners and loud complaints that Wei was trafficking in federal subsidies.

As commercial shipping has continued to slump, more companies have turned to the Navy, which has boosted the number of private ships that it buys and leases to support its military fleet. Wei has had close ties with the Navy for more than a decade. Four of Wei's ships, built with Title 11 loan guarantees, were leased to the Navy's Military Sealift Command in the early 1970s. The Navy paid to charter the ships and hired Wei's company to provide the crews.

The Navy decided that Wei's company was not providing adequate maintenance on the ships, according to Navy spokesman Art Mullins. He said the Navy took away part of the contract for maintenance in 1979 and hired another company to keep the four ships in working order. Over the last two years, the Navy has not renewed leases on three of the ships, and the fourth is about to lapse.

But Wei was ready with replacements. He recently received five-year Navy charters for two of his newest tankers, the Falcon Leader and Falcon Champion.

The Falcon tankers were built with construction subsidies approved on the last day of the Carter administration, shortly before the program's funds were cut off. Now the Navy is paying more than $15,000 a day to charter the ships.

Wei has remained in the business of providing crews by forming a new company called Sea Mobility. The company recently won a $41 million contract to provide crews and maintenance on 12 new Navy surveillance ships, in part by persuading Seafarers International Union to accept wages of less than $5 an hour for some crew members, or about half the prevailing industry wage.

Asked why another Wei enterprise would be given a new contract for ship maintenance in light of his other firm's failure to satisfy the Navy, the Navy's Mullins said Wei's latest contract will be "looked at very closely by the Navy so there will not be a repetition of the maintenance problems."