* Impairment due to poor profitability and capacity overhangin sector
* Unipetrol taking over minority stakes in refining unit
* In talks with government, has said it does not want tosell refinery (Adds details on refining business)
PRAGUE, July 23 (Reuters) - Czech oil processing firmUnipetrol took an unexpected 4.72 billion crown($231.5 million) impairment charge on its refining assets in thesecond quarter, pulling its net result into a loss of 3.49billion crowns.
The non-cash charge was made after testing its refiningassets amid worse-than-expected results in 2013 and 2014,overcapacity in the refining sector, and updated macroeconomicassumptions, Unipetrol said on Wednesday.
The company, majority owned by Poland's PKN Orlen,said that without the charge and deferred tax, net profit wouldreach 346 million crowns, above analysts' average forecast of184 million.
Unipetrol has been profitable on its petrochemical business,a trend that continued in the second quarter, with an 856million crown profit for that segment.
Revenue jumped 31 percent to 32.4 billion crowns, aboveforecasts of 31.35 billion crowns in a Reuters poll, in part dueto rise in its business and thanks to higher capacity that cameafter an acquisition.
The tough refining business, under the Ceska Rafinerskasubsidiary, prompted foreign investors in the refining jointventure to quit.
Unipetrol took over a 16.4 percent stake in Rafinerska fromRoyal Dutch Shell in the first quarter and agreed tobuy ENI's 32.4 percent stake in July, which will makeit Rafinerska's sole owner. It booked a one-off gain in thefirst quarter when it took over the Shell stake.
The Czech government, fearing closure of domestic refiningcapacity it sees as strategic, has been in talks with PKN aboutthe sector and said it was interested in buying the smaller ofRafinerska's two main operations. PKN has said it was notlooking to sell.
Unipetrol shares have lost 24.2 percent over the past yearto Tuesday's 130 crowns, while the Czech PX index gained8.1 percent over the same period. ($1 = 20.3850 Czech Crowns) (Reporting by Jan Lopatka; Editing by Gopakumar Warrier)