BUENOS AIRES — The last time an American president visited Argentina, he got caught in the maw of a rising leftist movement in Latin America.

In 2005, when President George W. Bush sought to push through a free-trade agreement for the Americas, he was skewered by Hugo Chávez, the Venezuelan leader, in a speech at a soccer stadium. Néstor Kirchner, the Argentine president, lectured Mr. Bush about regional policies promoted by the United States that had caused “misery and poverty.” The free-trade accord was ditched.

A decade later the backdrop to President Obama’s visit, beginning Wednesday, could not be more different. Mr. Chávez and Mr. Kirchner are dead, the momentum sapped from their leftist movement; and Argentina’s new center-right government is pursuing cozier ties with Washington.

“This is a historic opportunity for a new relationship, a new chapter,” Marcos Peña, the chief of cabinet, said at a briefing with reporters last week.