St Johnstone have moved to fend off interest in Jason Kerr by tying the defender down on a new three-and-a-half-year deal.
English League One side Barnsley were unsuccessful with a reported £100,000 offer for the 21-year-old earlier this week.
Now Saints boss Tommy Wright is looking forward to working with the former Scotland Under-21 cap for the foreseeable future after securing his services until May 2022.
Wright has also reshuffled his central defence by completing a loan swap deal with Partick Thistle that sees record appearance-holder Steven Anderson move to Maryhill for the rest of the season while Niall Keown takes his place in Perth.
Kerr made his Saints first-team breakthrough 12 months ago with a debut in the William Scottish Cup victory over Albion Rovers.
Before that the highly-rated centre-back had spent six months on loan at Queen of the South having previously helped East Fife lift the Ladbrokes League Two title back in 2015/16.
Kerr has been an ever-present fixture in Wright’s squad this season having already registered 28 appearances while contributing three goals.
Wright told the official Saints website: “I’m really pleased. It’s something we’ve been working on for a while now and we’re delighted to see Jason sign an extension because he’s done incredibly well for us this season.
“It’s just over a year since he came back from Queen of the South and he’s grown and matured as a player over the past 12 months.
“From speaking to him I always knew he wanted to stay here and the club had no intentions of selling him.
“Jason knows that he can still improve and he sees the best way to do that as being here at the club playing regular first-team football.”
Wright added: “The whole idea of sending Jason out on loan was to get him competitive football and he’s played a lot of games during his loan spells at Queen of the South and before that East Fife.
“Since he came back here and broke into the first team his all-round game has improved significantly.
“He’s improved in the air and also with the ball at his feet. His positional sense and strength has also improved over the past year.
“I’ve seen a massive improvement in him but there’s still aspects of his game he can work on if he wants to get to the very top and I believe he can do just that.”