North Macedonia qualified for Euro 2020, the first-ever major tournament in the team's 27-year history, when a second-half goal from 37-year-old forward Goran Pandev gave them a 1-0 win away to Georgia in their playoff.
Pandev, his country's most capped player and all-time leading scorer, flicked the ball home in the 56th minute of a tense, scrappy match played on a slippery pitch and was in tears as his team celebrated at the end.
Georgia, also hoping to qualify for their first major tournament, lost their composure after the goal and never threatened to get back into the game.
North Macedonia will face Austria, the Netherlands and Ukraine in Group C at Euro 2020, which has been postponed until June-July next year due to the Covid-19 pandemic.
"I am so happy. I've have played in a lot of games like this before and I think my experience helped the team to achieve this success," said Pandev.
Meanwhile, Hungary also qualified for the finals with a thrilling 2-1 comeback win over Iceland thanks to a late equaliser from Loic Nego and a stoppage-time winner by Dominik Szoboszlai.
Hungary will join Portugal, France and Germany in Group F at next year's tournament, with the first and third of those games to be played at the Puskas Arena in Budapest.
Iceland had gone ahead when goalkeeper Peter Gulacsi fumbled a Gylfi Sigurdsson free kick into his own net in the 11th minute, prompting a match-long onslaught form the home side.
Playmaker Szoboszlai was key to Hungary's effort, whipping crosses and set pieces into the box, and he almost put his side level just before the break with a long-distance free kick that required a full-stretch dive from Hannes Haldorsson to save.
The Hungarian siege on Iceland's goal continued in the second half, but they struggled to create many decent chances and looked vulnerable on the break as the visitors sought to exploit the space behind the home defence on the counter.
Iceland substitute Albert Gudmundsson almost killed the game off with a late sliding effort but just failed to connect with Jon Dadi Bodvarsson's cross and it was the costliest of misses.
French-born Hungary substitute Nego joined the fray in the 84th minute and he was quickest to a ball that pinged between defenders in the area, slotting home to equalise two minutes from the end of normal time.
Extra time loomed but Szoboszlai had other ideas and capped a superb performance by firing home in the second minute of added time to seal a stunning win and send his side through to the finals, prompting wild celebrations by his team at the end.