(Adds analyst comment, share prices and background)
By Tom Westbrook
SYDNEY, Dec 28 (Reuters) - Australia's top grocer Woolworths Ltd WOW.AX said on Wednesday it will sell its chain of petrol stations to BP plc BP.L for A$1.8 billion ($1.3 billion), the latest disposal in a bid to return the company's focus to its core supermarket business.
The sale of the fuel business, comprising 527 petrol stations and 16 development sites was flagged in September and follows its earlier exit from a disastrous foray into hardware, which led to a A$1.8 billion impairment charge. wasn't so great ... this is another area of their business that they weren't really managing well," said Juliana Roadley, a market analyst at stockbroker Commonwealth Securities.
Woolworths "didn't understand" the fuel business and would be best to concentrate on selling groceries, she added.
The fuel sold at Woolworths' petrol stations is currently supplied by Caltex Australia CTX.AX , which also bid for the business. Under the new arrangement BP will eventually supply and sell the fuel.
The fuel business reported earnings before tax and significant items of A$117.8 million for the year ended June 30. Its sale "is not expected to have a material impact on Woolworths Group earnings", the company said.
"The release of A$1.785 billion from the sale will be used to strengthen our balance sheet and reinvest in our core businesses," Woolworths Chief Executive Brad Banducci said.
The 92-year-old company posted its first annual loss since its 1993 listing in August, hit hard by the hardware impairment and squeezed margins amid a price war with rival Coles, owned by Wesfarmers Ltd WES.AX , and new entrants such as Germany's ALDI Inc ALDIEI.UL .
The deal, which was signed on Christmas Eve, is subject to regulatory approval and is not expected to be completed until January 2018 at the earliest, the statement said.
It also involves an agreement to continue a fuel voucher scheme and the parties will jointly trial a convenience business at 200 of the petrol stations.
Woolworths shares rose 2.7 percent to a two-month high in early trade, while the broader market rose 0.73 percent.
BP downstream chief executive Tufan Erginbilgic said in a separate statement that it has similar and successful partnerships globally with retailers such as Marks and Spencer MKS.L .
Caltex Australia chief executive Julian Segal said in a statement he was "disappointed" that his company's supply arrangement with Woolworths would end. Caltex shares fell as much as 2.6 percent in early trade.
($1 = 1.3926 Australian dollars)