The country's foreign trade association AEB had previously warned that 2013 could see the first full-year trade deficit since 2000.
Brazil avoided that scenario -- but the surplus still slid 86.8 percent compared to 2012, even if the performance surpassed market expectations of $1.2 billion.
Exports were off just 0.1 percent at $242.2 billion on 2012 -- but imports soared 7.3 percent year on year to $239.6 billion.
Despite worries of a potential slide in demand from China, the Asian giant remains by far the biggest market for Brazilian produce, accounting for a $46 billion share -- the United States lagging well behind with a $24 billion share.
Since 2000, Brazilian exports to China of products such as copper, soy and cellulose have increased around eightfold and the Chinese now have a total share of some 18 percent.
Exports to Asia as a whole rose last year by 2.3 percent but the increase to China was 10.8 percent.
Exports to Africa were off by contrast 9.9 percent, fell 8.2 percent to the United States and dropped by 3.6 percent to the European Union.
Imports from Western Europe slid 13.1 percent but imports from Africa rose 21.3 percent and 10.4 percent from the United States.