Craig Samson says joining Sunderland AFC's coaching staff was an opportunity he couldn't pass up.
The former St Mirren keeper has sensationally retired at the age of just 34 to take up the position at the Academy of Light, a chance to work under former Buddies boss Jack Ross again.
He replaces Jimmy Walker who last week quit as goalkeeper coach to move to Ipswich Town.
As part of the deal, Sunderland will travel north to play a friendly against St Mirren next summer.
Samson said: "I’d like to say thank you to the St Mirren fans for the way they’ve treated me and my family.
"It’s the best club I have ever been at. The way they have treated me, and everyone associated with me, has been absolutely amazing.
"I know it’s not ideal timing, but it was an opportunity I couldn’t pass up on.
"We had talked about the option of staying until January and playing until then but we all agreed it was best that we let the club go on.
"I hope the club can do really well and stay in the division as they really deserve it."
Ross added: "Craig played under me at St Mirren and he played alongside John Potter and James Fowler.
“Between us we all know him well and he was brilliant for me when I was manager at St Mirren.
“He has taken this big decision to come away from the playing side of things, but he recognises the opportunity he might have here to progress as an individual and collectively.
“He is just a really good fit for what we are trying to do at the club at the moment.”
Sammy, who has had two spells with St Mirren, retires after making over 150 appearances for the Buddies between 2010-2013 and 2017-2018.
In his time at St Mirren, he won the League Cup, the Ladbrokes Championship and broke the record for consecutive clean sheets at home.
St Mirren manager Oran Kearney said: "First and foremost, we’d like to thank Craig for his magnificent service to the club.
"He’s been a great character and an ultimate professional in my time at the club and goes with our best wishes.
"We discussed the option of Craig staying until January, but we feel it is in everyone’s best interests that he takes up his new role with immediate effect."
The popular shot-stopper was brought back to St Mirren for a second spell last year by Ross and played every league match as Saints won the Scottish Championship title.
He also broke a club record by keeping eight consecutive clean sheets in home league matches.
Samson then signed an extension to his contract in May 2018, keeping him at the club until the summer of 2020 but he has now retired and joined Sunderland.
A St Mirren statement added: "Everyone at St Mirren would like to thank Craig for all his efforts during his time at the club and wish him all the best in his future."