SÃO PAULO: Brazil registered its first annual trade deficit since 2000 as economic growth slowed and prices fell for iron ore, soybeans and other key commodities exports, government data showed here the other day.

Brazil ended the year with a trade deficit of $3.93 billion, compared with a surplus of $2.5 billion in 2013. It was the country’s first annual trade deficit since 2000, when it posted a deficit of $731.7 million. In December Brazil posted a trade surplus of $293 million.

“There is a moderation of the economic expansion of many countries across the globe, and it is affecting Brazil’s trade partners and as a consequence, hurt the country’s trade performance,” said Cristiano Oliveira chief economist of Banco Fibra, based in São Paulo.

A slowdown in China has curbed demand for raw materials, including iron ore, a major Brazilian export. A global glut of sugar and soybeans has driven down prices, further weighing on Brazil. The country is the world’s biggest and second-biggest producer of sugar and soybeans, respectively. Commodities such as iron ore, sugar, oil, beef, coffee, sugar and ethanol now account for nearly half of Brazil’s exports, up from about 30% a decade ago.

“The trade deficit just reinforced the view that Brazil is too dependent of commodities,” said José Augusto de Castro, president of Brazil’s Exporters Association.

But Brazil also is struggling with goods exports. Shipments of cars and auto parts plunged in 2014 due to economic woes in Argentina, Brazil’s biggest foreign customer for vehicles. Exports of planes and oil equipment also declined.

While some blame short-term factors such as Argentina’s economic slump, factory exports as a percentage of Brazil’s total exports have been declining for years. Shipments of finished goods and so-called semi-manufactured products including steel and wood pulp accounted for 51% of Brazil’s exports in 2013, down from 69% in 2003, according to the nation’s Ministry of Development, Industry and Foreign Trade.

Many manufacturers say red tape, high taxes, costly labor and other expenses have raised costs. Protectionist trade policies, including high-import duties, also have hurt Brazil’s competitiveness. Worker productivity is low and many factory owners, content to supply the local market, have had little incentive to invest. Brazil has no free trade agreements with the U.S., the European Union and China, the world’s largest markets.

“The Brazilian government must work to make manufactured products more attractive to other nations,” said Mr. de Castro of the exporter’s trade association.

Some exporters are banking on a weaker currency to spur foreign sales in 2015. Brazil’s real weakened nearly 13% in 2014 and is expected by some to fall further this year.

Brazil is projected to post a trade surplus of $5 billion in 2015, according to a recent central bank weekly survey with 100 economists.

But Mr. Castro said it may be for the wrong reason. He said many business owners are so negative about Brazil’s prospects this year that they are delaying plant and equipment investment, reducing imports of foreign-made machinery.

“This is bad for the economy because it generates a vicious cycle: with no investment, we have no growth” said Mr. de Castro said.

Economists say Brazil’s gross domestic product expanded by just 0.15% last year and is expected to grow 0.5% in 2015.