All 88,000 tickets at the cavernous Gelora Bung Karno stadium had been snapped up for the keenly anticipated showdown Monday night between the hosts and their rivals Malaysia, the visitors taking gold 4-3 on penalties.
With the game sold out, tens of thousands of eager supporters gathered outside the stadium, some hoping to buy tickets from touts and others finding spots in front of large outdoor screens, an AFP reporter on the scene said.
But 5,000 police were unable to control the crowd when a gate was momentarily opened and there was a crush to get in.
"The two victims died when the stadium doors at section 15 opened and everyone rushed in," Jakarta city police spokesman Baharudin Djafar told AFP.
"One of the bodies was identified and has been returned to his family, while the other is still at the morgue.
"Several others were taken to hospital with minor injuries, but one young boy slipped into a coma."
In the chaos, the bodies of the two men trampled to death -- both wearing the Indonesian team's jersey -- could not be immediately evacuated, police said.
Hundreds of people had been packed tight against the ticket barriers while fans inside the stadium were forced to crouch in aisles and walkways, witnesses said.
One of the victims was 21-year-old Reno Alvino, identified by his cousin Helmi Gemael.
"As we were entering the stadium, the crowd of people pushed each other to make their way forward," Gemael told AFP.
He said that Alvino "was pushed away from me and we were separated. I then heard that some people had fallen and that people had died."
He then "rushed to check" and found his cousin dead.
The bodies only reached paramedics two hours after the stampede, police said, and sat in a parked ambulance for an hour before being taken to hospital.
"When we found the victims, they were already dead," paramedic Abdul Majid told the Detik.com news portal outside the stadium.
Organisers Inasoc had said prior to the Games' opening two weeks ago that it had two helicopters on hand to rescue injured players or spectators from the massive stadium in the often-jammed south of Jakarta.
"I was not there and cannot comment on why helicopters weren't used," Inasoc chairwoman Rita Subowo told AFP.
"The stadium was very old. It was built 50 years ago with limited capacity," she said, calling on the government to build a new and bigger stadium.
The tragedy followed complaints over poor organisation at the multi-sport Southeast Asian Games and there had been calls for calm ahead of the flashpoint football final between arch-rivals Indonesia and Malaysia.
"We are saddened by the deaths and it is unfortunate that the game has come to such a point that hooligans and vandals now are spoiling what should be an enjoyable pastime," the Malaysian football association's secretary-general Azzuddin Ahmad said.
Earlier on Monday, fans had gone on the rampage after the stadium was declared sold out. They burned down a ticket booth and besieged the media centre before they were chased away by riot police.
Malaysia had requested armoured vehicles to escort their players to and from the venue after their bus was surrounded and kicked by hostile fans before their semi-final.
The run-up to the Games, which are split between Jakarta and the South Sumatra city of Palembang, were plagued by concerns over unfinished venues and a lack of accommodation and poor transport.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional