British cyclist Simon Yates attacked on the steep ascent to the finish to win the 19th stage of the Giro d’Italia on Friday and made only a dent on Egan Bernal's overall lead with two days remaining.

Yates attacked with more than six kilometers (four miles) to go and held off the field on the double-digit gradient to the Alpe di Mera finish.

More Images
Colombia's Egan Barnal is followed by Portugal's Joao Almeida as they climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

British cyclist Simon Yates attacked on the steep ascent to the finish to win the 19th stage of the Giro d’Italia on Friday and made only a dent on Egan Bernal's overall lead with two days remaining.

Portugal's Joao Almeida climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Yates remained third overall, 2 minutes, 49 seconds behind Bernal, who actually increased his lead slightly over second-placed Damiano Caruso to 2:29.

Britain's Simon Yates climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

The penultimate stage on Saturday has been given the maximum difficulty rating of five stars. The 164-kilometer (102-mile) route from Verbania to Valle Spluga-Alpe Motta includes more than 4,200 meters of vertical gain and three top-category climbs including the final ascent to another summit finish.

Cyclists climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Colombia's Egan Barnal climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Colombia's Egan Barnal climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

João Almeida was second at the end of the 166-kilometer (103-mile) leg from Abbiategrasso, 11 seconds behind Yates. Bernal decided not to respond to Yates and merely to manage the gap; the Colombian finished third, 28 seconds behind.

Colombia's Egan Barnal is followed by Portugal's Joao Almeida as they climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Colombia's Egan Barnal is followed by Portugal's Joao Almeida as they climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Yates remained third overall, 2 minutes, 49 seconds behind Bernal, who actually increased his lead slightly over second-placed Damiano Caruso to 2:29.

The stage was modified to bypass the top-category climb of the Mottarone after a cable car disaster there killed 14 people on Sunday. The new, slightly shorter route nevertheless featured three categorized climbs — including a top-classed one to the finish.

The riders unanimously decided to donate all of the prize money from the stage to the sole survivor, five-year-old Eitan Biran, and the families of the victims.

Portugal's Joao Almeida climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Portugal's Joao Almeida climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

The penultimate stage on Saturday has been given the maximum difficulty rating of five stars. The 164-kilometer (102-mile) route from Verbania to Valle Spluga-Alpe Motta includes more than 4,200 meters of vertical gain and three top-category climbs including the final ascent to another summit finish.

The Giro finishes on Sunday in Milan with an individual time trial.

More AP sports: https://apnews.com/hub/apf-sports and https://twitter.com/AP_Sports

Britain's Simon Yates climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Britain's Simon Yates climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists climb during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Colombia's Egan Barnal climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Colombia's Egan Barnal climbs during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 19th stage of the Giro d'Italia cycling race, from Abbiategrasso to Alpe di Mera, Italy, Friday, May 28, 2021. (Fabio FerrariLaPresse via AP)