By Teis Jensen and Ole Mikkelsen

COPENHAGEN (Reuters) - Danish conglomerate A.P. Moller-Maersk <MAERSKb.CO> has agreed to sell major stakes in two retail chains for about 17 billion Danish crowns (1.89 billion pounds) as it focuses on its core shipping and oil businesses.

Maersk is selling 48.7 percent of Dansk Supermarked, the largest retailer in Denmark, and 18.7 percent of department store chain F. Salling, to the Salling Companies.

The conglomerate has an option to sell its remaining 19 percent stake in each retailer after five years.

Shares in Maersk were up 4.2 percent compared with a 0.8 percent rise in the Danish benchmark index <.OMXC20CAP> at 0954 GMT.

Chief Executive Nils Smedegaard Andersen said on Tuesday the two retailers had been good investments but were no longer core businesses for Maersk and the time was right to sell.

Maersk plans to spin off non-core activities to focus on five areas - the container shipping company Maersk Line, port operator APM Terminals, Maersk Oil, Maersk Drilling and Services & Other Shipping.

On Sunday, Maersk agreed a deal to divest 15 very large crude carriers to Belgium's Euronav <EUAV.BR> for $980 million.

Andersen declined to comment on what the company will do with cash from the retail stake sales.

"We don't have any acquisition plans. This is not part of a financing scheme. We have a very strong balance sheet," he said. "For now we will reduce our net debt".

He confirmed that the group will keep its 22.84 percent stake in Denmark's largest bank, Danske Bank <DANSKE.CO>.

Sydbank analyst Jacob Pedersen said the price was higher than he had expected, adding that it could result in an extraordinary dividend for Maersk's shareholders in the beginning of 2015.

Analyst Jesper Christensen from Alm. Brand Markets said the next divestment from Maersk could be its drilling barge activities in Venezuela.

(Additional reporting by Stine Jacobsen,; Editing by Erica Billingham)