Millwall have secured the permanent services of Shane Ferguson.
The 24-year-old has spent the majority of the campaign on loan with the League One Londoners from Newcastle United.
The two clubs have now agreed an undisclosed fee, which has freed Ferguson to sign a contract at The Den until the summer of 2017.
"It's a relief to get the deal done," the Northern Ireland international told the club's official website.
"I've been keen to get everything sorted and I'm now really looking forward to my future with Millwall.
"I've loved every second of my time here so it was a no-brainer to sign on a permanent basis."
Ferguson has made 28 appearances for the Lions, from which he has scored two goals.