On a fence-mending mission, President Barack Obama held up Argentina on Wednesday as an emerging world leader worthy of U.S. support, as he and Argentine President Mauricio Macri broke with years of tensions between their countries.

Obama's state visit to Buenos Aires quickly turned into a love-fest between him and Macri, who in December replaced Cristina Fernandez, long a thorn in Obama's side. Obama lavished praise on Macri and said his visit was "so personally important," and even danced the tango at a state dinner in his honor.

"President Macri is a man in a hurry," Obama said in Casa Rosada, the pink-hued presidential palace made famous in the U.S. by the movie "Evita." ''I'm impressed because he has moved rapidly on so many of the reforms that he promised."

Macri, who has committed Argentina to a pro-business approach, was equally effusive about Obama, who leaves office in less than a year.

"You emerged proposing major changes and you showed they were possible — that by being bold and with conviction, you could challenge the status quo," Macri said. He added, "That was also a path of inspiration for what our dear country is now going through."

The feel-good visit continued in the evening at an event center overlooking the Buenos Aires riverfront, where Obama was taking in a tango performance when a dancer in a shimmering gold dress beckoned him to the floor. At first, he declined — multiple times — but eventually relented, joining her for a few spins. First lady Michelle Obama joined in the action, too.

Toasting his host, Obama said the world had noticed Macri's "eagerness to re-engage Argentina with the world community."

"This is a new beginning," he said.

Obama has made no secret of his preference for Macri over the left-leaning Fernandez, whose meandering invectives against the U.S. were a source of frequent eye-rolling in the White House. Fernandez was close with Hugo Chavez, Venezuela's famously anti-American late president, and openly admired Cuban revolutionary leader Fidel Castro. She was quick to blame the U.S. for Argentina's problems and was accused of helping Iran hide its role in bombing a Jewish center in Buenos Aires, a claim she denied.

So Obama was all too glad to see Fernandez replaced by Macri, who has started pushing Argentina back toward the political center after years of flirting with the extreme left. To that end, Obama's visit was a reward of sorts to keep that promising trajectory on track.

It's a theme of Obama's Latin America policy that was on vivid display a day earlier in Cuba, where Obama paid a history-making visit aimed at spurring further reforms in the communist country. Obama's administration has also been heartened by the Venezuelan opposition's recent success in legislative elections and Bolivian President Evo Morales' defeat in a referendum on term limits.

Those developments have fueled optimism in Washington "that Latin America is moving toward more rational economic and political policies," said Gabriel Salvia of the Center for the Opening and Development of Latin America, an Argentina-based think tank.

Yet Obama conceded that America's history backing repressive regimes in the region had clouded its ability to take the moral high-ground. His visit, the first for a U.S. president in nearly 20 years, coincides with the 40th anniversary this week of Argentina's 1976 coup, stirring up lingering questions about America's role supporting the military dictatorship that followed.

At Macri's request, Obama has agreed to declassify U.S. intelligence and military records about the period known as the "Dirty War," a gesture Macri said would help Argentinians "know what the truth is." Before closing his visit on Thursday, Obama planned to pay homage to the dictatorship's victims at Remembrance Park in Buenos Aires.

"I don't want to go through the list of every activity of the United States in Latin America," Obama said. But he said one of the "great things about America" is that "we engage in a lot of self-criticism."

Still, there were detractors. Some prominent rights groups threatened to boycott Obama's visit to Remembrance Park. And a few hundred people gathered at a McDonald's in protest.

"We reject Obama's presence because the United States is most responsible for the dictatorship," said Victoria Remesa, a 25-year-old teacher-in-training.

It was the opposite sentiment at a factory-turned-concert hall where Obama fielded questions from young Argentinians at a town hall meeting. He called on one fawning woman who said she was "going to have a heart attack," adding that "you are my hero." It turned out she didn't actually have a question.