(Adds finance and budget ministers' comments)
By Lisandra Paraguassu
BRASILIA, Nov 9 (Reuters) - Brazil's government on Wednesday congratulated U.S. President-elect Donald Trump on his victory but faced the delicate task of rowing back comments by its foreign minister expressing fear that a Trump presidency would be a "nightmare."
Brazil's currency weakened by around 1.6 percent in afternoon trade due to risk aversion and uncertainty over economic policy following Trump's victory.
During the U.S. presidential campaign, Brazilian government officials had openly preferred Democratic nominee Hillary Clinton to Trump, viewing him as unpredictable and opposed to freer trade.
However, on Wednesday Brazilian President Michel Temer sent a message to Trump expressing confidence they could work together to expand cooperation between their nations - the largest economies in the Americas.
"I wish you much success in the government of the United States," he added.
Temer sees boosting trade with the United States and drawing U.S. investment as key to lifting Brazil out of recession.
Trump has opposed the Trans-Pacific Partnership trade deal and favors raising tariffs on Chinese goods as well as major changes to the NAFTA pact with Mexico and Canada to protect U.S. jobs.
"The American people have decided," Temer said in a radio interview. "All we can do is raise our hats and congratulate."
There was no immediate comment from Foreign Minister Jose Serra who had labeled the possibility of a Trump presidency a "nightmare" and urged Americans to vote for Clinton in a newspaper interview in August.
Serra had added at the time: "Do nightmares, at times, come true? They do, but I prefer not to think about this."
Trump has worried Latin Americans with his views on immigration and vows to expel illegal immigrants and build a wall on the U.S.-Mexican border.
But a Foreign Ministry official told Reuters that Serra's criticism of Trump could make it hard to advance a trade agenda with the incoming administration.
"It put us in a delicate situation and could bury closer commercial ties," said a senior ministry official who asked to remain unnamed due to the sensitivity of the matter.
"This will be a complication, besides the fact that Trump does not like trade accords," he told Reuters.
In a statement, Finance Minister Henrique Meirelles said that the government was monitoring any impact that Trump's victory could have on prospects for Brazil's recovery from a recession which has ground on for more than two years.
"All I can say is that we wish Trump a successful government that can help restore economic growth globally and in Brazil," Budget and Planning Minister Dyogo Oliveira told reporters. (Writing by Anthonhy Boadle, Editing by W Simon)