WASHINGTON — After loans backed by Fannie Mae and Freddie Mac skyrocketed last year due to heightened refinancing activity, the two mortgage giants will more than double their contributions to two trust funds that support affordable housing.

The Federal Housing Finance Agency has authorized Fannie and Freddie to contribute a total of $1.09 billion to the National Housing Trust Fund and the Capital Magnet Fund in 2021, more than twice the amount they gave in 2020 and the highest contribution to date.

Since 2015, Fannie and Freddie have transferred funds for the two housing initiatives typically at the beginning of every March. The government-sponsored enterprises set aside 4.2 basis points of their unpaid principal balance from the previous year.

According to the FHFA, the leap in trust fund contributions reflects much higher refi activity over the past year, boosting the volume of loans on the GSEs’ balance sheets. The combined unpaid principal balance for loans backed by the GSEs was $1.43 trillion in 2020, compared with just over $652 million in 2019.

In 2020, Fannie and Freddie contributed a total of $502.2 million to the two funds, up from $376 million the year before. The GSEs this year will contribute a total of $711 million to the National Housing Trust Fund and $383 million to the Capital Magnet Fund.

“The more than $1 billion disbursed today will help produce and preserve affordable housing throughout the country,” FHFA Director Mark Calabria said in a statement. “The record increase in house prices last year exacerbated the affordable housing shortage. To help increase the supply of affordable housing in our communities, FHFA remains steadfast in support of the Housing Trust Fund and Capital Magnet Fund.”

The National Housing Trust Fund, managed by the Department of Housing and Urban Development, provides states with resources to build, preserve and operate affordable housing for extremely low-income households. The Capital Magnet Fund is managed by the Treasury Department and provides grants to community development financial institutions and nonprofit affordable housing organizations.