John Hughes felt the "football gods" were smiling on Ross County as goals from veteran midfielders Iain Vigurs and Michael Gardyne sealed his side's Scottish Premiership status in a 2-1 win at Motherwell.
County were heading for the play-offs at the halfway stage of Sunday's final matches, with Sam Foley's early goal giving Motherwell a 1-0 lead over County and Kilmarnock 2-0 up at Hamilton.
But Vigurs, who has played close to 250 times for the club over two spells, equalised with a brilliant curling finish to put Killie back into 11th early in the second half.
And record goalscorer and appearance-holder Gardyne slotted home in the 66th minute.
Hughes took over the helm four days before Christmas with the Staggies rock bottom.
But big wins over the likes of Celtic, Aberdeen and Hibernian kept them in with a chance and they won their last three games to consign Killie to a two-legged clash with Dundee.
Hughes said: "Since I came in, we've had a fantastic response. Not every week, which has been my frustration.
"There have been highs and lows, but I have always said that you are beating Celtic and Aberdeen and doing it for a reason, to keep us in the Premiership.
"In the last three games, to do what we did, especially today, with so much at stake, was a big test of character. Especially after going a goal down. We stood up to it and it was two wonderful goals.
"It just shows you how the football gods play it out. You are talking about two guys, two stalwarts of the club in Vigurs and Gardyne.
"The football gods must have been looking down on us and I am grateful.
"But, once again, it was the performance. I knew if the performance was good we had a right good chance."
The former Inverness manager's contract expires at the end of the season but he was talking like he will still be at the club next term ahead of discussions with chairman Roy MacGregor.
"I have to speak to the chairman and that means all the players will be away," he said.
"But it's not all my decision, we have to sit down and have a real talk about where we want to go and how we want to do it. It has to be planned strategically for the best of Ross County.
"I will be sitting down with the chairman and I will be up there for a couple of weeks. It's important I do that. I have not been home since I took the job, with the Covid. That's what you have to do, you have to commit."
The defeat proved costly for Motherwell, who dropped below St Mirren into eighth place.
Graham Alexander took charge two weeks after Hughes, with their clubs level on points at the foot of the table, but the Motherwell manager was disappointed that his side's mentality had wavered during the final game.
"We took our foot off the pedal and we're not good enough to do that," he said.
"We've done the job we wanted to do when we came in by staying up but there's a bad taste in my mouth after today.
"But that might be good for me going forward in terms of helping me clarify a few things in my mind."
Alexander will now take some time to decide on the future of several players.
"I don't think you make good decisions in anger so I won't be doing that," he said. "I already have quite clear ideas about what to do but there were a couple of players who were on the fence and I'll just have to see (on Monday) where we go with that."