Two weeks ago, a tanker carrying oil for petroleum-starved Turkey halted on high seas south of here, its owners on the verge of ordering it to turn around because they lacked assurances that the Turks were able to pay for the cargo.

It was a desperate situation, a Western diplomat recalled later. The Carter administration urgently decided to transfer $98 million ($35 million of it a grant) to the Turkish state bank.

Later that day, Prime Minister Suleyman Demirel unveiled a major reform program to revive a dying economy that rivals its state-planned counterparts in Soviet Bloc countries for inefficiency and bureaucratic paralysis.

For instance, the Turkish national airlines employs more than 8,000 persons although it has only 14 aircraft; Turkey's nationalized coal industry, which a decade ago employed 30,000 workers producing 5 million tons a year, now has 70,000 workers producing 4 million tons, and one-half of Turkey's federal budget was needed to cover deficits of state-owned firms, which account for 50 percent of the country's industrial production.

Turgut Ozal, the new economics chief, ticked off these statistics to illustrate problems the reforms would eliminate if Turkey gets a "quick injection" of Western hard-currency support.

The new reforms represent very bitter medicine for a seemingly hopeless malady. Demirel devalued the Turkish lira, lifted most restrictions on foreign investments and streamlined administrative procedures for foreign investors in an effort to restore Turkey's credit.

He also cut federal subsidies to state-owned industries from about $5 billion annually to less than $900,000.

Western diplomats say that failure to revive the economy would deal a devastating blow to Turkey's Western-style parliamentary system and could lead to a military coup.

The political system here, said a senior NATO diplomat, has "the kind of structure and stability that doesn't exist anywhere else in the Islamic world. It is in our interest to keep it that way."

With Turkish industries operating at 30 percent capacity, the Turks urgently need foreign-currency support in the next two to three months if the reforms are to get off the ground.

Key Western nations at a January 1979 summit in Guadoloupe put together a $900 million aid package, but 12 months later half of that amount has yet to reach Turkey.

The surest sign that the reform package represents a last-ditch effort to prevent economic and political collapse is the extent of government austerity measures and the departure from traditional economic practices that the government plans to put into effect.

Only once before was there a similar challenge to the principle of state monopoly over key production and service industries that is the legacy of Kemel Ataturk, who founded modern Turkey in 1923. The man who mounted that challenge, prime minister Adnan Menderez, was sent to the gallows after the military seized power in 1960, in part because of his vigorous advocacy of free enterprise.

Historically, the Turks ruled a vast empire stretching from the Persian Gulf to Austria, but they left commerce and industry to their Greek, Armenian and Jewish subjects. A Turk who was not a farmer pursued one of three occupations: he could be an administrator, a soldier or could choose religious training and perform legal and spiritual functions.

When Ataturk and his followers set out to modernize Turkey in the period between the two world wars, they used authoritarian methods to force technology and education on a reluctant nation.

Turkey has made quick progress, especially during the past 30 years, in the fields of industry and agriculture. Electricity has been brought to nearly 50 percent of villages along with approach roads that link nearly all of them in an extensive network of paved roads and highways.

Much of the country's rapid economic expansion, which averaged 6 percent annually, was underwritten by Western and primarily U. S. aid. From 1947 -- when Turkey became important as a bulwark against Soviet expansion -- to 1975 this aid totaled about $15 billion.

At the same time, the country experienced a very fast growth in population from 19 million in 1950 to 45 million today. Labor shortages in Western Europe absorbed substantial numbers of Turkish workers and provided Turkey with a steady influx of foreign exchange in the form of worker's remittances.

The world oil crisis in 1973 and the 1974 Turkish invasion of Cyprus that produced a U. S. arms embargo against Turkey have had a devasting cumulative impact which became evident only last year. Successive Turkish governments continued to rely on deficit financing by increasing foreign borrowing to an alarming $14 billion, much of it in shorm-term accounts.

During the past two years, with the country on the brink of bankruptcy and unable to raise funds in international markets, the government resorted to the printing press, increasing the money supply by almost 150 percent in 22 months.

When Demirel came to power last November, Turkey was unable to service its debts and its entire export earnings were used for oil purchases. Inflationary pressures have created such dislocations in domestic financial markets that savings accounts now give 40 percent interest while interest rates on short-term loans are about 120 percent.

In the short run the reform measures may increase the already perilous 25 percent unemployment as well as put additional strain on the middle class crushed by a cumulative 300 percent inflation over the past three years.

But, Demirel and his aids argue, the measures would introduce a market economy, encourage Turkish exports and foreign investments, and put the country back on its feet. "We are not a hopeless case," the prime minister said.

The reforms have no chance of success unless Western allies provide a minimum of $700 million in aid within the next two to three months according to top Turkish officials. Apart from restoring confidence at home and abroad, such Western assistance is needed to help restore economic activity here.

The West Germans have taken the lead in putting together an emergency aid package. The Carter administration intends to provide $450 million in military and economic aid, but congressional action on the proposal is expected later this year.

The Turks also must resolve the issue of terrorism in the country before they can expect an upsurge in private foreign investments.

By pressing for major restructuring of the economy, the Demirel minority government adds another element of uncertainty to an already complex political situation. His predecessor, opposition leader Bulent yecevit, has denounced the reform program as a "betrayal" of the people "who are being abandoned to the mercies of the cruel market at a time of great economic difficulties."

Ecevit's social democratic People's Republican Party suffered a severe setback last November when the right-wing parties, including Demirel's Justice Party, won a combined two-thirds of the vote.

Turkish businessmen insist that the government has not gone far enough in lifting trade restrictions, especially those that prevent an effective money market here. But most of them hope that the reforms will succeed.