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