Mark Reynolds will leave Aberdeen in the summer and join Dundee United.
The experienced defender is currently on loan at the Championship club and has signed a pre-contract agreement at Tannadice. He will join on a three-year deal at the end of the season.
Reynolds had two loan spells at Pittodrie before signing permanently in 2012, where he was reunited with his former Motherwell manager Craig Brown.
He was part of the League Cup winning side against Inverness in 2014 and was a consistent figure in Aberdeen securing four consecutive second-placed finishes.
A cruciate ligament injury sustained against Cove Rangers in pre-season ruled him out for the first half of this campaign but he was back in full training before the end of last year.
A loan deal to United was pushed through on deadline day to allow Reynolds to regain match fitness and he has made nine appearances for Robbie Neilson’s side.
His final game in an Aberdeen shirt was last season’s 1-0 win over Celtic, the last of 237 appearances for the Dons.
Manager Derek McInnes said: “I’ve been in regular contact with Mark over the last few months. He’s been offered a fantastic opportunity at Dundee United and we wish him well with that.
“He’s been a very good servant to the club over a period of time and a very valuable member of my squad since I’ve been at the club. He showed great determination to come back from a serious injury and now Dundee United will reap the benefit of Mark’s ability and experience going forward and we wish him every success.
“Mark’s built strong relationships with everyone throughout the club, both on the football side and behind the scenes, and while he will be missed, we understand his decision to go and play regular football.”