Di Maria collected Messi's expertly timed pass in the 58th minute Saturday and nonchalantly lobbed it over the goalkeeper. Nigeria, the 1996 champions, settled for the silver medal.
"This group deserved this," Messi said. "We knew coming in that we may never have this experience again, so we are lucky that everything went well and we got what we wanted."
Brazil, which has never won Olympic gold, earned the bronze medal Friday by beating Belgium 3-0 in Shanghai. After the final, Ronaldinho and his teammates stood on the field to collect their bronze medals and see the title go to their biggest rivals.
Messi almost didn't play in the tournament because FC Barcelona won a ruling that it could pull him from the tournament. The Spanish team allowed him to play.
"I think he has played very well in the Olympic tournament," Argentina coach Sergio Batista said. "He's played very well today as he normally does in his position and I knew that he could probably be the deciding factor."
The final began at noon in the Bird's Nest, and the referee took the rare step of twice allowing players to stop and take drinks.
"Maybe the heat was a factor," Batista said. "I think it the game had been played in another part of the day it would have been very different."
The game was the only one to be played in Beijing's main Olympic stadium, and it was watched by a crowd of 89,102 that included former Argentina great Diego Maradona. But the fans had to wait a long time to be entertained.
Not surprisingly, the searing heat made for poor quality in the first half
- mistakes, misplaced passes and slow movement to conserve energy.
"We tried to make sure that we didn't get uptight, just too play our own game," Batista said. "We wanted to play with intelligence and move the ball around and not run around so much. We wanted the ball to do the work."