LENZERHEIDE, Switzerland (AP) — Kate Courtney is the first American to win the mountain bike world championships in nearly two decades, holding off Danish rider Annika Langvad to win the rainbow jersey.

Langvad took an early lead and Courtney spent much of the day decreasing a 20-second gap. The 22-year-old from California caught Langvad, the 2016 world champion, with a few laps left.

She eventually opened a 48-second advantage. That turned out to be the winning margin, with Emily Batty of Canada finishing third.

The U.S. once dominated mountain biking, but the growth of the discipline in the late 1990s largely left the Americans behind. Alison Dunlap was the last to win a world championship in 2001.