Hungary had a trade surplus of 838 million euros in February, the Central Statistical Office (KSH) said in a first reading of data on Monday.
The surplus was up by 72 million euros from the same month a year earlier.
Exports rose by an annual 5.0 percent to 8.524 billion euros. Imports were up by 4.5 percent at 7.685 billion euros.
About 81 percent of exports and 79 percent of imports were traded with other European Union member states.
For January-February, exports were up by 7.5 percent annually at 16.991 billion euros and imports rose by 6.8 percent to 15.455 billion euros.
The trade surplus in the first two months of the year was 1.536 billion euros, up by 207 million euros from the same period last year.
KSH will publish a second reading of the February data on May 3.
Takarékbank analyst Gergely Suppán said the trade data exceeded expectations, but projected the full-year surplus would fall by about 200 million euros to 7.88 billion this year, impacting GDP to a lesser degree than in 2017.
Erste Bank chief analyst Orsolya Nyeste said the February data were a positive surprise, but added that import growth would likely exceed export growth from the second quarter of the year, causing the full-year surplus to fall.