WARSAW (Reuters) - Poland's biggest refiner PKN Orlen (>> Polski Koncern Naftowy ORLEN SA) said on Monday it agreed to buy Canadian upstream company TriOil Resources (>> TriOil Resources Limited) for 563 million zlotys ($177.43 million), in a deal to help turn it into an oil producer.

PKN Orlen, which does not have its own oil fields, will gain access to TriOil's total production capacity of some 20 million barrels of oil equivalent as part of the deal. TriOil's assets are located mainly in the Canadian province of Alberta.

"We will gain access to producing fields and will diversify our asset portfolio geographically," PKN's chief executive officer Jacek Krawiec said in a statement.

Once TriOil shareholders approve the deal, which is expected in November, PKN will buy 100 percent of the Vancouver-listed company for C$2.85 per share. Shares in TriOil stood at C$3.06 on Friday on the Canadian TSX Venture Exchange.

Assuming TriOil's outstanding debt, the total transaction value amounts to C$240 million.

"The price seems fair, as it is below the book value," Monika Kalwasinska, analyst at DM PKO BP said. "The current net value of TriOil fields was estimated at C$250 million in the company's report for 2012."

"The news is positive as PKN is entering upstream. But it is more about access to new technologies, since TriOil is a small company with not a very big production and reserves,"

At 4:35 a.m. EDT shares in PKN rose 0.7 percent to 43.39 zlotys while the Warsaw blue chip index WIG20<.WIG20> gained 0.9 percent.

PKN said that in the first two quarters of 2013 TriOil's average daily production doubled year-on-year to some 4,000 barrels of oil equivalent. PKN itself refined 6.7 million metric tons of oil in the second quarter of 2013.

The deal is the latest for a Polish company to buy Canadian assets. Last year Europe's No. two copper producer KGHM (>> KGHM Polska Miedz SA) bought Canadian miner Quadra FNX for some 9 billion zlotys in the biggest deal overseas deal by a Polish company.

Earlier this year, Kulczyk Oil Ventures, owned by one of the Poland's richest businessmen Jan Kulczyk, acquired a Toronto-listed firm Winstar Resources for C$112 million.

(Reporting by Agnieszka Barteczko and Pawel Bernat; Editing by Michael Kahn and Jane Merriman)