Aberdeen needed the away goals rule to advance to the second qualifying round of the Europa League as they were held to a scoreless draw by Shkendija on Thursday night.
Peter Pawlett saw a shot come back off the crossbar, while Adam Rooney had a penalty claim waved away, but ultimately the Dons did enough by preventing Shkendija from scoring at the other end following the 1-1 draw in the first leg.
But what worked for Aberdeen worked against St Johnstone, who went out on the away goals rule as they could only manage a 2-1 win over the 10 men of Alashkert.
Michael O'Halloran levelled the tie on aggregate in the 34th minute and St Johnstone's chances appeared to improve considerably with the 65th-minute dismissal of Karen Muradyan.
But Norayr Gyozalyan struck in the 74th minute and, although Brad McKay scored a late goal for the Scots, it was not enough.
Linfield lost 4-3 to NSI Runavik in a wild match in the Faroe Islands, but that was enough for the Northern Irish side to go through 5-4.
Reece Glendinning put Linfield ahead in the 13th minute, but they trailed six minutes later as Klaemint Olsen and Pol Johannus Justinussen hit back.
Guy Bates levelled, Jens Joensen put NSI back in front before Andy Waterworth levelled again, and although Justinussen had the final word on the night, Linfield had done enough.
However, there were heavy defeats for Northern Ireland's other two sides in the competition.
Glenavon lost 3-0 away to Belarusian side Shakhtyor Soligorsk to complete a 5-1 aggregate defeat. Aleksandr Yurevich, Nikolai Yanush and Dmitri Komarovski got the goals for the hosts.
Cup winners Glentorna lost 3-0 to MSK Zilnia in Slovakia to go down 7-1 on aggregate as Matej Jelic bagged a hat-trick for the hosts.
Newtown booked their place in the second qualifying round as they won 2-1 away to Maltese side Valletta, completing a 4-2 aggregate win.
Jason Oswell and Matty Owen scored either side of Thierry Fidjeu's goal for the hosts.
Newtown go forward as the last remaining Welsh side in the competition as Airbus UK and Bala took their leave.
A 2-2 draw away to Lokomotiva Zagreb was not enough for Airbus UK as they went out 5-3 on aggregate in Croatia, while a late goal for Differdange saw Bala lose 4-3 on aggregate despite a 2-1 win on the night.
Conall Murtagh opened the scoring in the 49th minute and Ian Sheridan's goal seven minutes from time levelled the tie on aggregate, only for Omar Er Rafik to score five minutes into stoppage time to snatch victory.
UCD are through to the second qualifying round after advancing on away goals, having lost 2-1 away to Dudelange to make it 2-2 on aggregate.
Ryan Swan fired the Irish side ahead after 17 minutes, and although the hosts scored twice in the space of five minutes immediately before half-time through Joel Pedro and Kevin Nakache, UCD hung on to advance.
The Dublin club, who play in the Airtricity League first division after being relegated from the Premier Division at the end of the 2014 season, were only handed a place in the competition when the Republic of Ireland was granted an extra berth for its third place in UEFA's Fair Play League.
Home advantage did nothing to help St Patrick's as they lost 2-0 to Skonto in Dublin, completing a 4-1 aggregate loss.
Cork's hopes came to an end in extra time as they lost 2-1 to the 10 men of KR Reykjavik in Iceland, going out 3-2 on aggregate.
Mark O'Sullivan's 13th minute goal put Cork on course for the second qualifying round, but - although the hosts had Skuli Jon Fridgeirsson sent off a minute before half-time - Reykjavik levelled through Palmi Palmason 15 minutes from time.
That sent the match to extra time, and Jacob Schoop's 99th-minute goal did for Cork.