JAKARTA, Indonesia (AP) — Hiroto Inoue won the Asian Games marathon gold medal after a late tangle with Bahrain's Elhassan Elabbassi as the pair sprinted together in the closing meters of the race.

The Japanese runner finished in 2 hours, 18 minutes and 22 seconds and held his arms out wide as he crossed the line less than a meter ahead of Elabassi, who was credited with the same time.

Inoue and Elabassi dueled for the lead over the last five kilometers on a steamy Saturday morning in the Indonesian capital.

They entered the main stadium together and were shoulder-to-shoulder coming around the last curve of the athletics track. Elhassan attempted to surge inside Inoue on the left in the inside lane with about 50 meters to go but collected the foot of his Japanese rival and lost his balance.

"It was a tough race. I knew I'd win in the home stretch so I went all out," Inoue told Japanese media. "This is a big confidence boost for me. I wouldn't have been able to accomplish this alone."

It was Japan's first gold in the Asian Games men's marathon in 32 years, and comes as the country prepares to host the 2020 Tokyo Olympics.

China's Duo Bujie took the bronze, 26 seconds behind, and Japan's Hayato Sonoda, who set the pace at the 30 and 35-kilometer marks, faded to finish fourth. Ser-od Bat-Ochir of Mongolia led at the 25-kilometer mark before finishing in fifth place.

The race was held in hot, humid conditions despite the 6 a.m. start. Six of the 21 starters failed to finish.

The win gave Japan the first gold medal of the athletics program and 30th overall in the games, which are being co-hosted by Jakarta and Palembang. China led the medal standings with 66 golds ahead of day 7.

The track and field program kicks off Saturday, with competition in the decathlon during the day and the men's 100-meter heats on the night program.