SEOUL -  South Korea said on Sunday it has agreed with Indonesia to sign a bilateral, three-year currency swap deal worth up to $10 billion, which could help Jakarta better defend the rupiah hit by capital flight.

This would bring the total value of currency swaps that Indonesia has secured with foreign countries this year to boost its defence at an equivalent of $37 billion, including a $15 billion deal with China and a $12 billion deal with Japan.

“The two sides agree that such arrangement will contribute positively to the stabilization of the regional financial market and strengthen bilateral economic and financial cooperation to counter against the growing uncertainties in the global economy,” Seoul’s finance ministry said in a statement.

Either of the two Asian countries can swap 10.7 trillion won for 115 trillion rupiah or vice versa under the deal, which South Korea’s finance ministry said was agreed on Saturday between finance ministers and central bank chiefs in Washington. They were attending International Monetary Fund/World Bank annual meetings.

South Korea and Indonesia are both members of the Group of 20 major economies.