Trans World Airlines Inc. said yesterday that it had agreed to buy a large chunk of Texaco Inc. stock, making it Texaco's largest shareholder and fueling speculation that TWA's controversial chief executive, Carl Icahn, would try to prod the oil giant to settle its multibillion-dollar legal war with Pennzoil Co.

TWA announced that it will pay $348 million to buy 12 million Texaco shares from a company controlled by the Australian tycoon Robert Holmes a Court. Combined with 5.9 million shares TWA said it already owns, the purchase gives Icahn's company a 7.4 percent share in Texaco.

TWA also received the right of first refusal to buy another 12.1 million Texaco shares owned by Holmes a Court, whose corporate empire was badly shaken by last month's crash in the world's financial markets. In the meantime, TWA said it has the right to vote by proxy this additional block of Texaco stock, giving the company voting control over 12.4 percent of Texaco's shares.

With yesterday's announcement, Icahn, a well-known corporate raider who acquired TWA after a bruising takeover battle in 1985, moves into a position possibly to influence the long fight between Pennzoil and Texaco, observers said. At the very least, they said, Icahn could reap a significant profit if, as expected, Texaco's stock rises in the months ahead.

A Texas court has ruled that Texaco must pay Pennzoil $10.53 billion for interfering with Pennzoil's agreement to buy Getty Oil Co. in 1984. Texaco subsequently filed for protection under the federal bankruptcy code, allowing itself to pursue an appeal of the record judgment without posting a bond for the full amount and thus crippling the company.

The two sides have remained far apart in settlement talks. Last week, for instance, Pennzoil proposed that Texaco pay Pennzoil a nonrefundable $1.5 billion in exchange for agreeing to limit Texaco's total liability in the case to $5 billion -- even if the U.S. Supreme Court upholds the full judgment. Texaco scoffed at the offer.

Despite Texaco's stated determination to fight to the bitter end, pressure has been building on the company to settle the case. On Nov. 2, the Texas Supreme Court refused to hear the company's appeal of the verdict, leaving the U.S. Supreme Court as Texaco's only remaining hope to reverse the decision. Texaco's creditors also have been pushing the two sides to settle.

Icahn was unavailable for comment, and a Texaco spokeswoman refused to say anything beyond a statement that the firm would review disclosure filings that TWA is expected to make shortly. Nonetheless, there was considerable speculation yesterday that the presence of a large, aggressive shareholder like Icahn would add to the growing pressure against Texaco.

"You've got to be influenced by a major stockholder," said one bankruptcy expert familiar with the case. "You have to guess that what {Icahn} is going to try to do is force something to happen."

TWA said it will pay $29 for each share of Texaco stock it plans to buy from Holmes a Court. Texaco stock moved up $2.12 1/2 per share in heavy trading yesterday on news of the TWA purchase, closing at $30.62 1/2, and analysts said the price should appreciate even more sharply in the event of a settlement. Pennzoil stock closed at $73.62 1/2, up $3.87 1/2.

Still, some analysts downplayed talk that Icahn would be in much of a position to influence matters and guessed that his purpose was purely making a long-term investment.

"It is very difficult to try to come in and expedite a settlement, because the two sides are so far apart," said Philip L. Dodge, who follows the industry for Nomura Securities in New York. "The bankruptcy proceedings are really in a realm of their own."

Dodge and other analysts, citing the complexities of Chapter 11 and the immense cost involved, also said that it is highly unlikely that Icahn would seek a complete takeover of Texaco.