The benchmark KOSPI is displayed at a dealing room in Hana Bank, in Seoul, Friday. Yonhap

Korean retail investors borrowed a record amount from securities firms in the second quarter of this year as the local stock market extended its strong rally, industry data showed Sunday.

The combined average daily balance of margin loans and stock-backed loans reached a record 61.98 trillion won ($40.5 billion) in the April-June period, up from 57.42 trillion won in the January-March period, according to the Korea Financial Investment Association (KOFIA).

The average daily outstanding balance of margin loans stood at 46.95 trillion won in the second quarter, up 15.9 percent from the first-quarter average of 31.01 trillion won.

Margin loans refer to funds borrowed by investors from brokerage firms to purchase stocks that have yet to be repaid and are widely regarded as a key gauge of debt-funded stock investing.