RIO DE JANEIRO (AP) — Moments after crossing the finish line, Greg Van Avermaet lamented the many times he'd fallen just short and all the close calls that have marked his cycling career.

Then, he climbed to the top step of the Olympic podium and claimed a gold medal.

The popular Belgian out-sprinted Jakob Fuglsang of Denmark and Rafal Majka of Poland on the long run to the finish at Copacabana Beach on Saturday, winning a chaotic men's Olympic road race marked by brutal climbs, withering heat and a crash involving the leaders on the final harrowing descent.

The perilous conditions vanquished multiple Tour de France winners and several prerace faces, and left plenty of riders with scrapes, bruises and bloody road rash.

"I fell just short so often. I missed out in the end so often," Van Avermaet told reporters in Flemish at the finish line. "This makes up for everything."

Fuglsang took silver for Denmark. Majka began cramping but earned bronze for Poland.

Nowhere to be found were Italy's Vincenzo Nibali, one of the favorites, and Colombian counterpart Sergio Henao, both of whom crashed out of the lead just miles from the finish.

Nibali and Henao were going so fast over the bending, forest-lined roads that TV cameras on motorbikes couldn't keep up, making it unclear what caused their spill. Both were still on the pavement when the cameras arrived — Nibali was later found to have a broken collarbone.

"I feel sorry for our guys," Nibabli told his coach, Davide Cassani.

More painful than the broken bone may be his squandered chance. The hard course offered a rare opportunity for the Giro d'Italia winner and former Tour de France champion to compete for gold.

"When I saw the crash I was confused about how many riders were still up the road," Van Avermaet said. "I was working with Fuglsang, and we saw Majka. We knew it was possible."

Known more for his climbing chops, Majka was eventually reeled in as the race neared the finish, where a sun-splashed crowd that had spent the day on the beach awaited their arrival.

The long course was tightly guarded by police, no small challenge in a host country that has been dealing with spikes in crime. The only incident occurred a few hundred meters from the finish line, where a bomb squad detonated an unattended bag hours before the riders returned.

The race rolled off to the soundtrack of crashing waves and under clear, sunny skies buzzing with helicopters — some carrying TV cameras, others from the military to provide security.

Riders headed along the brilliant beaches of high-end neighborhoods, then began attacking each other on their way south. The day's break quickly formed when six riders slipped away and built a gap of nearly 8 minutes, among them former world champion Michal Kwiatkowski of Poland.

The brutality of the course became evident over the cobblestone sectors.

Ahmet Orken of Turkey was rattled off his bike. Richie Porte of Australia had his chain bounce off.

The break stayed clear through four laps of the Grumari Circuit, a 25-kilometer loop that began stringing out the field. The riders then headed back toward Rio and began three climbs of Vista Chinesa, a tough uphill slog that splintered what was left of the peloton.

So hard was the course that reigning world champion Peter Sagan of Slovakia chose to try his luck in the mountain bike race. No doubt many rivals thought it was the right decision.

"The heat and the distance and the wind and the downhill and the cobbles. It had everything," said Brent Bookwalter, an American who finished 16th. "It was really a roller coaster."

One by one, a pack driven by Britain, Spain and Italy pulled back the break, though Kwiatkowski made them work for it. His jersey flapping open in the midday heat, the Polish star was finally caught by six riders after nearly 200 kilometers spent at the front.

Time trial favorites Porte and Nelson Oliveira of Portugal crashed during one of the fast descents, and Porte spent was eventually taken to Vitoria Hospital in Barra for an examination. He had broken his shoulder blade in the wreck and will miss out on Wednesday's race against the clock.

There was more carnage on the final march.

The images of Nibali and Henao lying on the road caused a gasp among fans watching on a big screen at the finish line, and Britain's Geraint Thomas joined them on the ground.

Van Avermaet managed to stay upright — all the way to the finish.

"The highlight of my career," the Belgian said as the sun set. "It's not going to get any better."