BUCHAREST, Romania (AP) — Austria finally earned a victory at the European Championship, and they got the goals they needed from the bench.

Michael Gregoritsch and Marko Arnautović both came on as substitutes and scored late to help Austria beat North Macedonia 3-1 Sunday in Group C.

It was Austria’s first win at a major soccer tournament in 31 years and its first ever at the European Championship.

Austria captain David Alaba set up the winning goal for Gregoritsch, curling in a perfect cross in the 78th minute. Arnautović calmly scored the final goal after rounding the goalkeeper with a minute to go.

Both forwards rejuvenated the team after they were sent in to play in the the 59th minute.

Austria is playing at the European Championship for the third time, but it’s the first victory they have managed to secure — including when playing as co-host at Euro 2008.

Austria defender Stefan Lainer scored the first goal in the 18th minute, and then grabbed a white shirt from the bench to deliver a message to Christian Eriksen, the Denmark midfielder who collapsed on the field on Saturday in Copenhagen.

“Eriksen, stay strong,” the message read.

Austria’s lead didn’t last long, though.

North Macedonia captain Goran Pandev equalized 10 minutes later, making the 37-year-old veteran the second oldest player to score in the tournament’s history. Only Ivica Vastic was older when he scored for Austria against Poland at Euro 2008 when he was 38.

___

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports