By Yi Wei Wong

Malaysia recorded its largest-ever monthly trade surplus in June, as exports to China and the U.S. rebounded amid easing Covid-19-related restrictions globally.

The country's trade surplus for the month was 20.89 billion ringgit ($4.91 billion), up 98.7% from the same period last year, the Ministry of International Trade and Industry said Tuesday.

Exports rose 8.8% to MYR82.87 billion, driven by a 13.7% gain in manufactured goods, which made up almost 88% of total exports. Exports of agricultural goods rose 30% amid higher demand for palm oil and related products.

Exports to China, one of Malaysia's largest trading partners, jumped almost 47% to MYR14.78 billion, driven by higher exports of iron, steel, petroleum and palm oil-based products. Exports to the U.S., another key trading partner, rose almost 28% to MYR9.76 billion, driven by higher exports of manufactured goods.

Imports contracted 5.6% due partly to a fall in mechanical products, copper and electrical machinery, the ministry said. Imports from other countries in Southeast Asia fell 13.8% to MYR13.61 billion.

Malaysia's exports during the first half of 2020 dropped 6.8% while imports were down 7.2% as trade with Thailand, Singapore, India, Japan and Germany slowed. The country posted a trade surplus of MYR64.61 billion for the period, down 4.1%.

Write to Yi Wei Wong at yiwei.wong@wsj.com