Japan’s net external assets rose to their second-highest amount on record at the end of fiscal 2016, driven by rising mergers and acquisitions overseas by firms and portfolio investment, the Finance Ministry said Friday.

The net value of assets held by the government, businesses and individuals stood at ¥349 trillion ($3.12 trillion) — just behind 2014’s record ¥363 trillion. It meant Japan remained the biggest creditor nation for the 26th straight year, the ministry said.

As at end of fiscal 2015, Japan’s net external assets were at ¥339 trillion.

The net external assets were about 1.7 times those held by China, the world’s No. 2 creditor nation with ¥210 trillion in net assets at the end of last year, followed by Germany, the ministry said.

Japan’s gross external assets rose 5 percent to a record ¥998 trillion as increase in Japanese direct investment overseas and foreign bond investment more than offset drops in the appraised yen value of foreign currency-denominated assets.

Japan’s direct investment in the United States reached a record ¥53 trillion at the end of fiscal 2016, up ¥2.7 trillion from a year ago, making it the most popular destination that accounts for a third of overall Japanese direct investment overseas.

Overall external debt grew 6.2 percent to a record ¥649 trillion due to increased foreign direct investment and acquisitions of Japanese bonds by foreign investors.

The dollar lost 2.7 percent in value to ¥117.11 at the end of 2016 from a year ago, while the euro fell 5.9 percent to ¥123.43, the ministry said.