Millwall have signed Shane Ferguson from Newcastle United on an 18-month contract for an undisclosed fee.
The Northern Ireland defender, who can also play in midfield, has made 28 appearances for the League One club since joining on loan in August.
Ferguson, 24, made his debut for Newcastle in 2010 and appeared 32 times for them, with 19 of those as a substitute.
He has also had loan spells at Birmingham City and Rangers.