PAOK held Panathinaikos to a 1-1 draw on Tuesday to win the Greek league playoffs and earn a place in next season's Champions League.
Playing in front of a boisetrous crowd, PAOK went ahead in the 17th minute when an unmarked Garry Rodriguez fired into the top right corner.
A speculative shot from distance by Panathinaikos midfielder Robin Lod found its way into the net in the 26th minute, after a failed attempt to clear the danger by PAOK defender Miguel Vitor.
PAOK only needed a draw to win the playoff competition but stayed on the offensive. However, the fans at Toumba stadium were silenced in the 86th when the visitors almost stole a win. A shot by Mladen Petric was stopped with an impossible-looking save by PAOK goalkeeper Panagiotis Glykos.
Hearts stopped again for the home fans in stoppage time, when English goalkeeper Luke Steele ran into PAOK's penalty area and headed just wide.
"We knew it would be a difficult game. We wanted a win and so did they," said PAOK coach Vladan Ivic, who took over in March to rescue the club's fortunes. "But our players really gave it everything they had and we made it through. It's been a difficult year for us, so this is a great moment."
The six-game playoffs followed a runaway title win by Olympiakos, who will enter the Champions League in the third qualifying round along with PAOK.
The northern Greek side ended the playoffs with 12 points, one ahead of Panathinaikos, who will enter the Europa League third qualifying round along with Greek Cup winners AEK Athens.
Panionios finished bottom of the playoff table and will enter the Europa League second qualifying round.
Panathinaikos coach Andrea Stramaccioni described his club's playoff performance as disappointing.
"It was a season that was not good," he said. "It will teach us to learn from our mistakes."
The fields for both the Champions League and Europa League are now complete, though UEFA will still decide on whether to grant licenses to teams from Kosovo, who joined the regional body earlier this month.
Information from The Associated Press was used in this report.