NEW YORK (AP) _ Texaco Inc. on Monday announced that it had agreed to sell its West German subsidiary to Rheinish-Westfaelisches Elektrizitaetswerk AG, the country's largest utility company, for a little more than $1.2 billion.

At its headquarters in Essen, the German firm, also known as RWE, said it would pay $1.23 billion for Texaco's 99.12 percent interest in Deutsche Texaco AG, completing the first major part of a $5 billion restructuring plan by the White Plains, N.Y.,-based oil giant.

The deal, signed in Luxembourg, was subject to approval by the West German Federal Cartel Office, but both sides said they expected it to encounter no difficulties. It will become effective five days after the permission arrives, probably by the end of the month, said RWE spokesman Friedhelm Gieske.

Negotiations leading to the sale had been going on for months, as Texaco immersed itself in plans to restructure following its April emergence from Chapter 11 Bankruptcy Court protection.

The nation's third-largest oil company had filed for that protection a year earlier to avoid having to post an $11 billion security bond while appealing a $10.3 billion judgment held against it by Pennzoil Co. A jury ruled Texaco had interfered with Pennzoil's 1984 attempt to acquire part of Getty Oil Co. so it could buy Getty itself.

Texaco agreed in December to settle the suit by paying $3 billion to Pennzoil as part of a restructuring plan that included sales of $3 billion worth of assets.

Meanwhile, takeover artist Carl C. Icahn, its largest stockholder with 14.8 percent of the company's shares, stepped up pressure on Texaco's management to do more to increase the value of its stock.

In March, he threatened to run a slate of five candidates, including himself, for Texaco's board, if the company did not take steps that would raise the price to $55 per share from then-current levels in the $30 range.

A month later, Texaco, in an apparent bid for stockholder support, announced the restoration of its dividend and an expansion of its planned asset sales to $5 billion.

The moves failed to placate Icahn, who recently offered $60 per share for those Texaco shares he does not already known, and launched his threatened proxy fight for the five seats on the company's board. The results will be announced at Texaco's annual meeting on June 17.

Meanwhile, Texaco's stock has continued to hover at levels near $50 per share, as Icahn kept up his attacks on its management.

Commenting on the Deutsche Texaco sale, James W. Kinnear, president of the parent company, apparently had those criticisms in mind.

''The proceeds from this transaction, together with those from other imminent asset sales and joint venture partnerships, will be providing real benefits to our shareholders,'' he said in a statement. ''We are committed to significantly enhancing the value of our shareholders' investment.''

Kinnear's statement did not specify how Texaco shareholders would benefit from the sale, however, ignoring speculation that the company might issue a special dividend to shareholders or disburse the proceeds in some other manner.

On Wall Street, Texaco's stock rose slightly after the announcement, closing at $50.87 1/2 per share, up 87 1/2 cents on the New York Stock Exchange.

As part of its restructuring, Texaco has also been negotiating the sale of 60 million barrels of U.S. oil and natural gas reserves, and has been talking with Saudi Arabia about establishing joint ventures involving East- and Gulf- coast refining and marketing interests.

RWE, West Germany's eighth-largest corporation, is active in the production and supply of electricity, brown coal mining, and the petroleum and chemicals businesses, Texaco said.

It said it acquired Deutsche Texaco, in the mid-1960s. The German company is active in all phases of the oil business, from exploration and production to petrochemicals.

It owns two refineries, capable of producing 140,000 barrels daily, and holds a 10.2 percent share of the West German retail gasoline market, with about 1,900 Texaco-branded retail outlets throughtout the country.