* Repsol sells 11.86 percent of YPF to Morgan Stanley
* Says to make $622 million pretax capital gain
* Sales follows Argentine compensation for 2012 YPF seizure
* Repsol shares flat
(Adds possible acquisitions and Argentine bonds sale)
MADRID, May 7 (Reuters) - Spanish oil major Repsol bid farewell to 15 years of business in Argentina with the sale of a stake in energy firm YPF to Morgan Stanley for $1.26 billion on Wednesday.
The sale, together with a $5 billion settlement with Argentina over its 2012 expropriation of a 51 percent stake in YPF from Repsol, opens a new chapter for the Spanish oil company that is likely to focus now on upstream investments.
Madrid-based Repsol is seeking acquisitions 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.
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.
Repsol Chairman Antonio Brufau has said the company would look for growth in OECD countries, with analysts tipping the United States, Canada and Norway as possible target markets.
It will also seek out assets that offer instant cash flow to compensate for the loss of its cash generating liquefied natural gas (LNG) business, sold last year under pressure from credit rating agencies to shore up capital, analysts said.
The LNG division's absence from Repsol's profit and loss account as of Jan. 1 is expected to weigh on the company's first-quarter results, due to be released on Thursday.
Repsol had already removed YPF's contribution from its profit and loss calculations in 2012 and took a 1.3 billion euro ($1.81 billion) writedown on its stake in 2013.
The company still needs to monetize $5 billion in dollar-denominated Argentine bonds that it is soon set to receive for the YPF settlement.
Repsol is already in touch with UBS, JP Morgan, Goldman Sachs and Deutsche Bank over the imminent sale of a first tranche of the bonds worth $1.5 billion, newspaper Expansion reported on Wednesday, citing unnamed financial sources. Repsol declined to comment on the report.
Analysts had estimated in February that the Argentine settlement and potential sale of the 12 percent stake in YPF would add some 3.5 euros to Repsol's shares, which were trading around 18.60 euros at the time.
Repsol's shares had a muted reaction to news of the YPF stake sale on Wednesday, trading flat at 19.31 euros, with analysts saying the price may already have partially reflected hopes for closure in Argentina.
Morgan Stanley may now sell the 11.86 percent YPF stake on to other investors after paying Repsol $26.90 per share, a source with knowledge of the matter said.
YPF American Depositary Shares closed on Tuesday at $28.18, implying a discount of about 4.5 percent for Morgan Stanley on the deal. ($1 = 0.7177 Euros)
(Additional reporting by Andres Gonzalez in Madrid and Freya Berry in London; editing by Richard Pullin and Tom Pfeiffer)