JAKARTA/SINGAPORE (Reuters) - Canada's Fairfax Financial Holdings Ltd (>> Fairfax Financial Holdings Ltd) has agreed to buy 80 percent of PT Asuransi Multi Artha Guna Tbk (AMAG) (>> Asuransi Multi Artha Guna Tbk PT) for about $165 million, a person familiar with the matter told Reuters, sending shares of the Indonesian insurer to a record high.

Fairfax, in a statement late on Monday, said it would buy the stake from PT Paninvest Tbk (>> Paninvest Tbk PT) and affiliates in a deal likely to close by year-end.

On Tuesday, AMAG shares rose as much as 15.5 percent to 462 rupiah ($0.035), compared with just 0.7 percent in the broader market <.JKSE>.

Fairfax's deal with the Panin Group, controlled by Indonesia's Gunawan family, highlights foreign interest in the Southeast Asian country's general insurance market after a number of deals in recent years in the life insurance segment.

Japan's Sumitomo Life Insurance Co [SMTLI.UL] bought 40 percent of the life insurance arm of PT Bank Negara Indonesia Tbk (>> Bank Negara Indonesia (Persero) Tbk PT), while compatriot Dai-ichi Life Insurance Co Ltd (>> Dai-ichi Life Insurance Co Ltd) acquired 40 percent of Panin Life.

Indonesia is an important emerging economy and the AMAG deal is "a great opportunity for us to continue to expand our operations in the region," said Fairfax Chairman and Chief Executive Prem Watsa.

Fairfax did not disclose the transaction value, but a person familiar with the deal said it was around $165 million. The person declined to be identified as the information was not public.

Goldman Sachs advised Fairfax and Barclays advised the Panin Group, people familiar with the matter told Reuters. Both Goldman and Barclays declined to comment.

Fairfax said it would integrate AMAG with its Indonesian subsidiary, and that AMAG would enter a long-term general insurance partnership with PT Bank Pan Indonesia Tbk (>> Bank Pan Indonesia Tbk PT).

(Reporting by Eveline Danubrata in JAKARTA and Saeed Azhar in SINGAPORE; Editing by Christopher Cushing)

By Eveline Danubrata and Saeed Azhar