Motherwell have confirmed defender Ricki Lamie has signed a new two-year contract at Fir Park.
The 28-year-old centre-back had signed a pre-contract agreement with Dundee, subject to whether or not they secured Premiership safety.
However, the Dark Blues were relegated to the Championship and Lamie activated a clause that has allowed him to pull out of a move to the City of Discovery and stay in Lanarkshire.
Lamie has now signed new terms with Graham Alexander's Steelmen, which will keep him at the club until summer 2024, and can look forward to Europa Conference League football in July when 'Well enter the second qualifying round.
Motherwell have this evening confirmed the news and Lamie told the club website: “Motherwell is an excellent club, with so many good people and characters.
“It was a great ending to the season for the team, to finish in the top six and qualify for Europe.
“That being said, I still think we can improve and have got more to give collectively.
"I really want to play a part in that, which is why I am pleased to be staying for at least another two years and I am already looking forward to getting back in next month.”
Boss Alexander said: “We are delighted Ricki has agreed to extend his stay with the club as we hope he will continue to be a big player for us in the coming months and years.
“We were in discussions with his representative for some time, but those were paused when another club made him what was an extremely attractive offer that he had no option but to accept.
"We understood and respected that, but had no concerns around his professionalism and in actual fact he was amongst our most important players in the second half of the campaign.
“When circumstances changed, it presented an opportunity for us and we’re so pleased to not only keep someone who is a big player on the pitch, but an important character off it too.”
Motherwell will return to training next month as they build towards their European adventure and the start of the Scottish Premiership season on July 30.
Follow Lanarkshire Live Sport on Twitter via @LanLiveSport, like us on Facebook or find us on Instagram for the latest sports news, pictures and video.