* Repsol sells 11.86 percent of YPF through Morgan Stanley
* Says to make $622 million pre-tax capital gain
* Sale follows Argentine compensation for 2012 YPF seizure
* Repsol shares up 0.4 percent (Adds Morgan Stanley comment on stake placement)
By Tracy Rucinski
MADRID, May 7 (Reuters) - Spanish oil major Repsol bid farewell on Wednesday to 15 years of business in Argentina with the $1.3 billion sale of a stake in energy firm YPF , opening a new era that is likely to focus on acquisitions.
The sale through Morgan Stanley, which follows a $5 billion settlement with Argentina over its 2012 expropriation of a 51 percent stake in YPF from Repsol, ends a thorny chapter in the Spanish company's history.
Morgan Stanley placed the YPF stake in a block trade in the market overnight, spokesman Michael Wang said. Earlier, Repsol issued a statement saying it had sold the stake to Morgan Stanley.
Madrid-based Repsol has been seeking growth opportunities in exploration and production as it tries to increase hydrocarbons output. YPF had accounted for over half of Repsol's production.
"We see the (YPF) divestment as a sensible move ... and the realization of material cash will add to expectations that Repsol may be near to reinvesting proceeds in an acquisition opportunity," said Deutsche Bank analysts, who have a "hold" rating on Repsol shares.
Repsol Chairman Antonio Brufau had said the company would look for growth in OECD countries, with analysts tipping the United States, Canada and Norway as possible target markets.
In a regulatory filing on Wednesday, Repsol said it would make a $622 million pretax capital gain from the sale of the 11.86 percent stake, which leaves it with under 0.5 percent of YPF.
Analysts said the sale was neutral from a valuation perspective and did not change Repsol's investment case, but was positive in the sense that it leaves Argentina firmly behind. By 1313 GMT, its shares were up 0.4 percent at 19.39 euros each.
Brufau's predecessor, Alfonso Cortina, bought 98 percent of YPF in 1999 with a view to turning refining-focused Repsol into a big league integrated oil and gas player.
However, Argentina's financial crisis in 2001 and 2002, and the election of populist President Nestor Kirchner in 2003, led to higher taxes and price caps, which meant YPF received well below world prices for the oil and gas it pumped.
By the time Brufau was appointed, the deal was viewed as a failure. In one of his first press conferences after replacing Cortina, Brufau said the company was too reliant on Argentina.
"Mr. Brufau has executed everything he had set out to do after YPF was expropriated, from making asset disposals to strengthening the balance sheet," Raymond James analyst Bertrand Hodee said.
Last year Repsol sold its liquefied natural gas (LNG)business, under pressure from credit rating agencies to shore up capital after the loss of YPF.
Any future acquisition will focus on assets that offer instant cash flow to compensate for the cash-generating LNG division, the absence of which is expected to weigh on Repsol's first quarter results due on Thursday, analysts said.
The results publication coincides with the day Repsol is set to receive Argentine dollar-denominated bonds for the YPF settlement.
Brufau has said he intends to sell the bonds within two years and newspaper Expansion said the company was already in touch with UBS, JP Morgan, Goldman Sachs and Deutsche Bank over the imminent sale of a first tranche worth $1.5 billion. (Additional reporting by Andres Gonzalez in Madrid and Freya Berry in London; editing by Richard Pullin, Tom Pfeiffer and Susan Thomas)