Seeking to build trust between the United States and Latin America,
"I hope we can reconstruct the confidence that was lost between our two countries," he said at a news conference alongside his Argentine counterpart, Mauricio Macri, at the Casa Rosada presidential palace in Buenos Aires.
Argentina is Obama's second and final stop on a Latin America trip that began this week with a historic visit to Cuba. Obama and Macri signed several bilateral agreements concerning education, security, technology and initiatives to attract investments to Argentina.
They also promised to cooperate in the fight against drug trafficking, which is on the increase in the country.
Many Argentines remain suspicious of the U.S. for what they view, at best, as tacit support for the military junta that ruled their country from 1976 to 1983 and killed an estimated 30,000 dissidents and left-wing political opponents.
Asked by a reporter whether the U.S. has done an adequate self-analysis of its role in supporting military dictatorships in Latin America in decades past, Obama said U.S. history includes "moments of glory and moments that run contrary to what America should represent."
"We have learned some lessons," he said.
Macri, a right-of-center businessman who once headed a popular soccer club, took office in December promising to rejuvenate an economy suffering from high inflation, low growth and declining trade, all inherited from his populist predecessor Cristina Fernandez de Kirchner.
He thanked Obama for his visit and its symbolism. "We interpret it as a gesture of affection and friendship at a time when Argentina is seeking new horizons," he said. "This is the start of a new stage of mature, intelligent and constructive relations.
"Your leadership has been inspirational," Macri told Obama. "You proposed huge changes and showed that with determination, one can challenge the status quo."
After the news conference, Obama visited the Metropolitan Cathedral in Buenos Aires, laid a wreath and paused before a monument to victims of the Holocaust.
He then hosted a town hall attended by upward of 1,000 Argentine youths. Obama answered questions for nearly an hour, at one point saying he was a fan of Argentine novelists Jorge Luis Borges and Julio Cortazar and at another offering some of his views on the U.S. presidential race.
He also told the crowd: "I'm in Argentina because I like the moves that Macri made at the start of his government to reconnect Argentina with the world."
Obama was scheduled to attend a ceremony Thursday commemorating "dirty war" victims in Remembrance Park. A number of Argentine human rights leaders have been invited. He and his family will then depart for the southern resort city of Bariloche, before returning to Washington on Friday.
Special correspondents D'Alessandro and Kraul reported from Buenos Aires and Bogota respectively.