Sanko Steamship Co., the world's largest operator of oil tankers, filed for protection from its creditors and reorganization under Japan's bankruptcy laws yesterday in the biggest corporate failure in postwar Japan.

The collapse had major political repercussions, leading State Minister Toshio Komoto, widely regarded as Sanko's controlling shareholder, to quit the Japanese cabinet. Komoto has long been mentioned as a possible future prime minister.

Despite annual losses of more than $200 million, Sanko had been limping along under a bailout granted by its creditors. But last week, its three main banks turned down requests for new loans, touching off a crisis that led to the filing this morning at a court in Amagasaki city, the company's official headquarters.

"We deeply apologize to all our shareholders and all our customers for our troubles," Sanko President Yoichi Akishino declared in a statement released today. " . . . We concluded there was no way to restructure by ourselves but only by the force of law."

Three affiliated companies, Zuito Shipping Co., Eastern Shipping Co. and Sanko Marine Co., applied for relief under the law simultaneously.

About 20,800 Japanese companies went bankrupt in 1984, but almost all were tiny. Conservative management generally keeps big companies in the black. Most of those that do get into trouble are kept afloat by aid from the government and their creditors.

Sanko directly employs only about 2,500 people, and its failure is expected to have only limited impact on the Japanese economy. But its fate sets a precedent in Japan, where conventional economic wisdom holds that large-scale bankruptcies must be avoided at all costs to uphold stability at home and Japan's reputation abroad.

Sanko, in particular, was widely believed to be safe because of the patronage of Komoto, who was formerly its president and today heads one of the major factions of the ruling Liberal Democratic Party.

Speaking to reporters today, Transport Minister Tokuo Yamashita, a member of Komoto's faction, suggested that Sanko will be kept in business in some restructured form, rather than being liquidated and its assets sold off.

Under Japanese law, the court must decide whether the applying company can be salvaged. Under that scenario, its assets would be frozen and a new operating arrangement worked out under the supervision of the court.

Sanko's debt to its banks is estimated to total about $2 billion. Japan's financial press has estimated that if money owed to trading companies and for charter fees is included, the total figure is about $4 billion.

Until now, the largest bankruptcy in Japan since 1945 involved the Eidai Co., a real estate development company that applied for reorganization in 1978. Its debts are said to have amounted to about $750 million at current rates of exchange.

As of March 31, Sanko was operating 264 vessels, about half of them oil or gas tankers. Its fleet accounted for about 20 percent of the Japanese shipping market. Most are owned by foreign companies and chartered long-term to Sanko. This allowed cut-rate financing and hiring of foreign crew members, whose wages are lower than those of Japanese seamen.

Founded as a one-vessel operation in 1934, Sanko earned a name as the "Lone Wolf" of the shipping industry here. During the 1960s, with Komoto as president, it grew by leaps and bounds and was the only company to stay out of a government program aimed at consolidating the shipping industry into six major companies.

Sanko's troubles date to the early 1970s, when it began a daring program to acquire large numbers of new supertankers. But following the 1973 oil shock, the market for the huge ships collapsed and the company was saddled with costly idle capacity.

Its financial problems were extreme, but the Japanese shipping industry in general began feeling squeezed in the 1970s because of oil-shock recession and rising costs. Shipping was officially classified as a declining industry by the Japanese government and made eligible for various aid programs to ease the descent.

In 1984, Sanko negotiated a three-year restructuring plan under which it would acquire 125 new bulk cargo carriers and sell off old ones. Sixteen of its 26 supertankers would be transferred to the books of subsidiaries.

Its three main creditors -- Daiwa Bank, Tokai Bank and Long-Term Credit Bank of Japan -- and about 80 smaller lenders would grant a moratorium on repayment of certain debts and lower the interest rates on others. But that plan also met trouble. Programs to unload ships stalled and, earlier this year, Sanko began talking of suspending orders for 20 of the new ones and getting new loans.

Komoto and Transport Minister Yamashita reportedly scurried around Tokyo bank offices trying to line up new support for the company.

One concession being sought from the government was the extension of a contract in which three Sanko tankers are anchored off Kyushu Island as floating storage tanks for Japan's strategic oil reserve. There was also talk of sending a retired high-ranking official of the Ministry of Transport to work at Sanko as a show of confidence.

But the three main banks, owed a total of close to $550 million, decided last week that without explicit guarantees from the government about Sanko's future, they could not continue putting more money in.

The news touched off a selling panic of Sanko's shares, leading the Tokyo Stock Exchange to suspend dealings in them. In foreign ports, Sanko ships reportedly were denied cargo and fuel services out of fear the company would be unable to pay its bills.

The decision pushed it into effective bankruptcy. Late Monday night, just hours before the reorganization petition was filed, Komoto submitted a letter of resignation to Prime Minister Yasuhiro Nakasone.

Komoto had resigned as Sanko's president in 1974 when he became minister of international trade and industry. But the company's fiscal 1984 annual report shows that he continued to hold a 3.3 percent interest in its stock. Many people believe his indirect holdings are far larger.

Komoto told Japanese reporters after his resignation as minister that, although he quit the company's management 11 years earlier, close associates of his had remained in control. "I have to take responsibility," Komoto was quoted as saying.

However, he did not quit his seat in the Diet, or Japanese parliament, and said he will stay on as head of his faction. His political future remains uncertain. But for the present, it appears that events have eliminated for Nakasone an important rival for control of the party.

Komoto had been considered special among faction leaders because he commanded his own source of political funds. However, his status appears to have suffered because, on the key issue of saving his own company, Sanko, he was unable to deliver.

Komoto held two jobs in the cabinet: overseer for Okinawan development and special coordinator for external trade relations. Today, Nakasone appointed Takao Fujimoto, a member of Komoto's faction, to succeed him in the Okinawan job. A member of another faction, Economic Planning Agency Director General Ippei Kaneko, was given the more important trade portfolio.