(Adds accumulated deficit from last year, background)
BRASILIA, May 2 (Reuters) - Brazil posted a trade surplus of $506 million in April, more than double what the market expected but not nearly enough to push the annual balance into positive territory.
Brazil's trade balance has been hit hard by fuel imports and a drop in the price of some key exports such as iron ore. An economic slowdown and currency woes in Argentina have also curbed exports to the neighboring country.
The surplus was more than double market expectations for a $250 million surplus, according to the median forecast of six analysts surveyed by Reuters. The country posted a surplus of $112 million in March.
Brazil, one of the world's major commodities exporters, posted a deficit of $989 million in April 2013.
The country has accumulated a trade deficit of $5.566 billion so far this year, slightly better than the $6.145 billion deficit posted during the same period last year.
The shrinking trade surplus is eroding Brazil's external balance, raising the current account gap to 3.64 percent of GDP in March from 2.98 percent in March of 2013. Last year's current account deficit was the biggest since 2001.
A worsening trade balance is a serious challenge for Brazil. The country is struggling with weaker demand for its exports due to a still-subdued global economy, and low productivity among Brazilian manufacturers has made their products less competitive against those of foreign rivals. (Reporting by Luciana Otoni; Writing by Alonso Soto; Editing by James Dalgleish and Meredith Mazzilli)