Not a warm welcome: The Obamas arrive in Brasilia today for a visit to promote trade links.

Barack Obama’s visit to Brazil had a very unpromising start after police had to quell riots against the U.S. in Rio de Janeiro with rubber bullets and tear gas.

The U.S. President landed in the capital of Brasilia with his wife and daughters, visiting the country on a mission to re-assert trade links with Latin America.

But the day before he landed Brazilian military police fired on 300 demonstrators who had gathered outside the U.S. Consulate in Rio.

Police cracked down on the crowd after protesters hurled a Molotov cocktail at the consulate door, the O Globo newspaper reported on its website.

‘I was in the centre of the protest when people began to run and I heard shots,’ said AFP photographer Vanderlei Almeida.

‘I had to get out of there because it was hard to breathe.’

The photographer said he was struck by two rubber bullets in the leg and the stomach.

Mr Obama’s visit to the region’s economic powerhouse is the centrepiece of his effort to re-engage with neighbours no longer content with being relegated to Washington’s ‘backyard’ and where the United States faces rising competition from China.

But after the riots he was forced to cancel an outdoor speech that he was set to give in a Rio square.

After Air Force One touched down at 7.31am local time, the president, his wife Michelle and daughters Malia and Sasha headed to their hotel before the president held morning talks with Brazilian President Dilma Rousseff.

As Brazilian troops dressed in ceremonial garb formed an honor guard, Obama walked up the futuristic ramp of the Palácio do Planalto, the presidential office building, where Rousseff greeted him with a hearty handshake.

While more regional themes will be touched on when the president visits other South American nations, the focus in Brazil – the seventh largest economy in the world – was on forging a political and economic relationship for the future.

For posterity: Photographers get ready to capture the moment as protestors unveil a U.S. flag that reads 'Obama go home' in Brasilia last night.

Mr Obama said: ‘Put simply, the United States doesn’t simply recognise Brazil’s rise, we support it enthusiastically. I believe we’ve laid the foundation for greater cooperation between the United States and Brazil for decades to come.’

While President Rousseff agreed, she said any true alliance between the two countries would have to be ‘amongst equals’.

Mr Obama decided to stick with his five-day itinerary, which will also take him to Chile and El Salvador and is pitched as a push for U.S. exports and jobs, despite an array of international troubles that may overshadow his travels.

‘I want to open more markets around the world so that American companies can do more business and hire more of our people,’ Mr Obama said in his weekly address on Saturday.

The President will seek to reinforce hemispheric ties that have become frayed at the edges but his attention is sure to be divided.

Senior aides will be with him at every stop to help him stay on top of events as the United States works with allies against Libyan leader Muammar Gaddafi and charts a response to Japan’s nuclear crisis.

Republican critics have accused the President of a failure to lead amid the global turmoil.

The White House has justified Mr Obama’s trip in large part for its potential dividends of boosting U.S. exports to help create American jobs, considered crucial to his 2012 re-election chances.

Latin America wants the respect it feels it deserves from Washington for its increasingly vibrant economic development, including growth outstripping the sluggish U.S. recovery.

Mr Obama had a packed schedule in Brasilia. After mending fences with Mrs Rousseff, he then addressed business leaders from both countries.

In between everything he made a brief statement as U.S. forces began an organised attack on Libya.

U.S. officials have made clear Mr Obama also wants to take advantage of a chance to repair diplomatic ties since Mrs Rousseff took office in January. Tensions rose under former President Luiz Inacio Lula da Silva over, among other things, Brazil’s overtures to Iran.

Mrs Rousseff, a pragmatic leftist, has veered back toward Washington and away from anti-U.S. leaders like Venezuela’s Hugo Chavez but she will likely insist on concrete results.