Dunfermline 1-2 Kilmarnock
Two goals in the final four minutes ensured Kilmarnock finished seventh in the Scottish Premier League thanks to a win over Dunfermline Athletic.
Relegated Pars were worthy of their first-half lead courtesy of Paul Willis' close-range finish following a Steven McDougall cut-back.
Kilmarnock dominated after the break and Liam Kelly smashed the ball high into the net for the equaliser.
Jude Winchester then fired the winner with a minute remaining.
And the defeat meant that Dunfermline leave the top flight with only one home win over the course of the whole season.
Bernardo Dominguez Fernandez had been handed his debut in Dunfermline's goal after arriving from Huesca in January.
He was one of seven changes made by Jim Jefferies as the manager prepared for life back in Division One by dispensing with most of the old guard as well as on-loan Rangers midfielder Kyle Hutton.
However, the defensive frailties that have bedevilled the side all season emerged again as Kilmarnock started the better of the two sides.
As Alex Keddie hesitated, Jordan McMillan's hasty attempt to clear struck Gary Harkins and slipped just wide of a Pars post.
Ross Barbour was making his first start for Kilmarnock along with goalkeeper Kyle Letheren, with injury-plagued Ryan O'Leary being handed a rare place in the first XI, in place of Cammy Bell, Chris Johnston and Mo Sissoko.
The young defender looked to be posted missing as McDougall, who was one of the fresh starters for the Pars along with Willis, set up the opening goal.
McDougall headed a Joe Cardle free-kick back across goal for winger Willis to fire his first goal of the season from close range.
The visitors looked more determined after the break and a low drive from William Gros forced Fernandez into a good save with his right boot.
Barbour ought to have done better than head wide from seven yards and Andy Dowie did well to clear from in front of his own goal after Gary Harkins lofted an effort over Fernandez.
Dunfermline appeared to have survived the onslaught, but Kelly pounced to fire into the roof of the net from just inside the box for his first goal of the season.
The Pars thought they equalised seconds later, but Martin Hardie was ruled offside as he knocked the ball home from close range when he perhaps should have allowed fellow substitute Andy Kirk's header cross the line.
Dunfermline paid for that moments later when Lewis Toshney cut the ball back from the bye-line for sub Winchester to fire in the winner.