Brazil has met Chinese wishes to recognise it as a market economy, a smiling President Hu Jintao told reporters in Brasilia on Friday.
China's Hu Jintao (right) beams after winning backing from Brazil's Lula
China sees the deal as an important step towards getting better trade terms from the World Trade Organisation.
Mr Hu is in Brazil for five days to discuss multi-billion dollar trade and investment deals ranging from soy to football and satellite.
Meanwhile, Brazil won greater access to China's huge market for food products.
Analysts say both countries are also strengthening ties as part of a strategy to lobby for improved trade conditions for developing nations.
Mr Hu was "all smiles" as he emerged from talks with Brazilian President Luiz Inacio Lula da Silva ("Lula"), according to the BBC's Tom Gibb in Sao Paulo.
"This position of Brazil will certainly make the conditions of the strategic relationship even richer and will favour economic and trade co-operation," Mr Hu said in a speech later.
He said he hoped annual trade between the two countries could reach $20bn in three years.
But the bilateral talks, which went on for 20 hours, nearly collapsed on Thursday night, said Luiz Fernando Furlan, Brazil's industry and trade minister.
"At first, the Chinese position was like a samba song with only one note: 'We are here to get the market economy status, full stop,'" Mr Furlan said, according to AFP news agency.
He said President Lula's "position was that we had to have a balanced agreement or we wouldn't have an agreement."
In return for its agreement, Brazil received greater access to China's market for chicken and beef products. The beef deal alone is expected to be worth $600m a year for Brazil, ministers said.
It also gained a commitment from China to order at least 10 aeroplanes from Brazilian maker Embraer, reported AFP.
To facilitate trade, the Chinese are offering between $5bn and $7bn worth of investment to improve Brazil's roads, railways and ports.
China already imports large amounts of Brazilian soy beans and mineral ores. In the long term, it sees Brazil's vast territory, much of it unexplored, as a potential solution for its own growing need for raw materials, says our correspondent.
China joined the WTO in 2001 and is currently deemed a "non-market economy" - attracting anti-dumping trade barriers on its exports until it gains market economy status.
In joining some 20 countries in designating China a market economy, Brazil waives the right to raise anti-dumping barriers on Chinese goods.
According to analysts, the backing of the world's ninth-largest economy also gives China a boost ahead of talks among the G20 group of developed and emerging
market economies in Berlin next week.
In the talks, Mr Hu also urged the two countries to co-operate within international organisations such as the UN and WTO to promote the interests of developing nations.
Analysts say the Brazil and China are helping strengthen a new bloc of developing nations - namely Brazil, Russia, India and China, collectively known as Bric - that flexed its muscles at trade talks in Cancun in 2003.
"They are trying to create a new axis of developing nations that work together, to form a counterweight to the industrialised nations," Latin America analyst Sue Branford said.
"But they have very different political systems. The grounds for their alliance are economic, and come from a common interest in changing the rules that cover world trade," she said.