Oxford United will sign left-back Tony Capaldi when his contract at Morecambe ends this summer.
The 29-year-old played 18 games this season after joining Morecambe on a short-term deal in September.
His last outing came on 22 March after falling out of favour with the club for criticising the club's training and calling them "rubbish" on Twitter.
Capaldi, who can also play in midfield, has spent time at Hereford, Cardiff City, Leeds United and Plymouth.
The Northern Ireland international said: "It's a great set-up at Oxford with great fans and I'm looking forward to getting my career back on track."
U's boss Chris Wilder said: "Tony brings undoubted quality and experience having played at a higher league level and internationally.
"I know he is determined to be successful in the latter part of his career."
Capaldi was a product of the Birmingham City youth academy and had a brief spell at Hereford before joining Plymouth in 2002.
Capaldi made 153 appearances for the Pilgrims, before he left for Cardiff on a three-year-deal in 2007.
In 2009 the Norway-born defender then joined Leeds but soon returned to Cardiff in January 2010 after failing to make an impact at United.
The left-back found himself out of contract again at the start of this season but after trials with Crystal Palace, Scottish Premier League side Hearts and again with Plymouth, he eventually settled at Morecambe on a short-term deal.
"I want to get another promotion while I'm still playing and this is the place to do it," Capaldi added.
"I can bring some experience to the side and am looking forward to the pre-season and pushing on with the club."