By James Glynn

SYDNEY--The Australian dollar is the strongest it has been since early 2019, as rallies in iron ore and gold help to offset economic shocks caused by the coronavirus pandemic.

The Aussie, as it is known in currency markets, has also benefited from weakness in the U.S. dollar after the Federal Reserve launched down a path of aggressive monetary easing and U.S. coronavirus cases--now above 5.5 million--skyrocketed. In contrast, Australia has recorded about 24,000 cases, mostly in its southeastern state of Victoria.

In mid-March, the Aussie was at its weakest in nearly two decades, around 55 U.S. cents. Many countries had imposed strict lockdowns to suppress the spread of the coronavirus, and markets plunged, with investors scrambling to dump international assets and secure U.S. dollars. This week, it climbed above 72 U.S. cents. While it pulled back a little Friday, the Aussie remains one of the best-performing major currencies during the pandemic.

China's economic recovery is helping the Aussie strengthen, after Beijing countered the effect of the pandemic with stimulus measures targeted at infrastructure and construction projects. China buys roughly 60% of all iron ore traded by sea, which it uses to make steel. Iron ore is Australia's top export by value.

The iron-ore price has surged to a six-year high at nearly US$130 a metric ton, according to S&P Global Platts data. The rally has surprised many analysts, given steel output outside of China is sharply lower and China is entering a seasonally weak period of construction, which may restrain demand.

Another of Australia's top commodity exports, gold, has also jumped this year as investors sought a hedge against the economic downturn. Gold achieved a record settlement of US$2,051.50 a troy ounce this month and is up around 29% in 2020 so far.

To be sure, Australia's trade story has been positive for some time. The country has now run trade surpluses for 30 consecutive months, without being derailed by either U.S.-China trade tensions or the pandemic. Foreign education, a US$20 billion industry, has been crippled by the border closure, but the loss of foreign tourists is being offset by Australians forced to vacation--and spend--at home.

"Silent airports have trapped billions of Aussie dollars at home that would have been exchanged for foreign currencies," said Sean Callow, currency strategist at Westpac.

The Aussie has risen by more than 8% in trade-weighted terms since February.

The rally comes even as Australia experiences a recession following 28 years of growth, after authorities shut down a swath of commerce early in the pandemic and closed the border to foreign visitors. On Thursday, Qantas Airways Ltd. said its international network is unlikely to restart before July 2021 except perhaps to New Zealand.

And diplomatic and trade relations between Australia and China have worsened. About 40% of Australia's exports now head to China, and that dependency could become a vulnerability if tensions escalate.

Australia campaigned for a global investigation into any missteps early in the coronavirus crisis that contributed to the pandemic, angering Beijing. On Tuesday, China said it is investigating whether Australia is dumping cheap wine into its domestic market, intensifying trade frictions that earlier saw it impose tariffs of more than 80% on Australian barley exports and suspend beef imports from some Australian slaughterhouses.

Ray Attrill, National Australia Bank Ltd.'s head of FX Strategy, said a broadening of frictions with China to include major commodities such as iron ore or natural gas would be cause for concern. NAB expects the Aussie to keep rising to 80 U.S. cents within the next couple of years, reflecting strength in commodity prices.

Another factor behind the resurgent Australian dollar is the Reserve Bank of Australia's policy approach.

Since March, the Reserve Bank of Australia has set a target of 0.25% for the yield on the government's three-year bond and kept interest rates near zero. However, RBA Gov. Philip Lowe has called a move to negative interest rates as extraordinarily unlikely.

In contrast, other economies have either moved rates below zero or signaled an openness to do so. Bank of England officials have said the controversial policy is under review as a potential tool to support the U.K. economy as it emerges from lockdown. The Reserve Bank of New Zealand this month said negative rates could be an effective way to provide monetary stimulus.

Mr. Lowe told a parliamentary committee recently a lower Australian dollar was preferable as it would support the economy. However, he said the RBA wasn't contemplating intervening in currency markets on the grounds that the Aussie wasn't overvalued and such a tactic may not work anyway.

Write to James Glynn at james.glynn@wsj.com