Moldovan champions Sheriff will play in the UEFA Europa Conference League playoffs after Ibrahim Rasheed Akanbi scored the match winner against compatriot Francis Uzoho of Omonia Nicosia in a final Europa League group game.
Akanbi got the all-important winner two minutes from time.
It was the second goal in the competition for the 23-year-old striker, who has also provided an assist.
Sheriff thus finished third in a group that also had Manchester United and Real Sociedad with six points from as many matches.
They will now take on one of the runners-up in the Conference League in a knockout playoff next year.
The draws will be conducted on Monday.