TOKYO (Reuters) – Japan and China on Friday signed a currency swap arrangement of up to $30 billion – the largest such bilateral deal concluded by Tokyo – to strengthen financial stability and spur business activity in both countries, the Bank of Japan said.

The arrangement, which takes effect on Friday and lasts until Oct. 25, 2021, will allow the exchange of local currencies between the two central banks for up to 200 billion yuan or 3.4 trillion yen ($30 billion), the BOJ said.

Earlier in the day, China and Japan signed a broad range of agreements on strengthening bilateral ties, pledging to step up cooperation in areas from finance and trade to innovation and securities listings.

The agreements were signed during Japanese Prime Minister Shinzo Abe's visit to Beijing for the first formal Sino-Japanese summit in seven years, as Asia's two biggest economies looked to further build relations and trust against a backdrop of trade friction with the United States.

"With the strengthening of economic and financial linkages between Japan and China, Japanese financial institutions have been expanding their renminbi-based businesses," the BOJ said in a statement.

The BOJ would be prepared to provide liquidity in the yuan currency, should Japanese financial institutions face unexpected difficulties in yuan settlements, and if the bank judges the liquidity provision to be necessary for ensuring the stability of Japan's financial system, it added.

The previous arrangement expired in September 2013 amid a low point in Sino-Japanese ties. Relations had soured in recent years due to territorial disputes and tensions over Japan's wartime history.

The swap was originally launched in March 2002 as part of multilateral currency swap lines known as the Chiang Mai Initiative, which was established in response to the Asian financial crisis in the late 1990s.

While the previous arrangement was designed to respond to current account crisis and stabilize currency markets in Asia, the new swap deal is aimed at supporting economic and financial activities in each country by enhancing financial stability.

The BOJ also signed a separate memorandum of understanding with the People's Bank of China, with the aim of exchanging information on the offshore yuan market. The MOU was agreed upon in conjunction with the establishment of a yuan clearing bank in Japan.