Maverick oilman T. Boone Pickens Jr. finally came up a loser in one of his corporate raids yesterday, dropping his pursuit of Unocal Corp. and taking an estimated loss of $100 million on his investment in the big oil company.

Pickens and Unocal agreed to a settlement of their two-month battle after Pickens lost a crucial court case and appeared to have lost an equally important vote by Unocal shareholders.

Pickens, the chairman of Mesa Petroleum Co., could not be reached for comment.

The settlement represented a major victory for Unocal, which gave Pickens his toughest battle yet. Pickens and his investing partners have made more than $1 billion in recent years by buying stock in and threatening to take control of major oil companies and then either selling their shares back to the companies or benefiting from takeover of the companies by other firms. Last year, an investors group led by Pickens made more than $600 million when it forced Gulf Corp. to be taken over by Chevron Corp., and earlier this year Phillips Petroleum Co. agreed to pay Pickens' group a profit of $89 million, plus $30 million in expenses, to end Pickens' raid on that company.

But Pickens had no such luck with Unocal. Under terms of the complicated agreement announced late yesterday, a Unocal spokesman estimated that the value of Pickens' 13.6 percent holding in the company will drop by about $100 million. Pickens' group paid approximately $1.2 billion for its stock, including nearly $100 million in interest and legal expenses.

A Mesa spokesman said it was not yet clear exactly how much the loss would be.

Ironically, Pickens will be allowed to retain his holding in the Los Angeles-based Unocal, but the stock's value will be greatly diminished and Unocal will be allowed strict control over what Pickens does with his shares. Among other things, the Amarillo, Tex.-based oilman is prevented from trying another takeover of Unocal for 25 years. "We've locked up his shares," said a Unocal spokesman.

Unocal stock did not trade yesterday as the two sides negotiated. But Jeffries & Co., a Los Angeles-based brokerage firm, was quoting the company's stock at $34 a share, off $12 from Friday's closing price of $46. Including interest charges, Pickens paid about $48 for each of his 23.7 million Unocal shares.

Under the agreement, Pickens will be allowed to participate in Unocal's $72-a-share buyback offer for about one-third of its shares. Unocal had sought to exclude Pickens from taking advantage of that offer, and although Pickens' court challenges of that position were at first successful, the Delaware Supreme Court on Friday ruled that Unocal could exclude Pickens from the offer if it so wished. That legal decision, as well as the apparent defeat by Unocal shareholders of Pickens' request for a two-month postponement of the company's annual meeting, hamstrung Pickens' takeover attempts and forced him to try to settle with Unocal.

Unocal said yesterday that current holders of its stock would get $72 a share for 38.4 percent of their stock, but under the agreement, Pickens' group will get the $72 a share for 32.5 percent of their stock. Pickens will also be required to swap $100 million worth of the debt securities that make up about half of the Unocal offer back to the company for 1.4 million Unocal shares.

Unocal also promised to distribute to shareholders interests in the limited partnership it plans to set up to cover its Gulf Coast oil properties. This part of the agreement, an apparent concession to Pickens' stated desire to get more value for Unocal shareholders, would require the distribution this year and next of $150 million a year, on an annualized basis, of dividends in the form of shares of the partnership.

The two sides also agreed to drop all litigation, and Drexel Burnham Lambert, the investment banking firm that set up financing for Pickens, agreed not to aid another takeover attempt of Unocal for the next three years -- a facet of the agreement that represents the latest in a growing trend of bars against certain investment bankers' participation in takeover attempts.