Swansea have signed defender Marcos Painter from Birmingham for an initial fee of £25,000.
Marcos Painter has been a long-time target for Swansea
The Welsh side will have to pay an extra £25,000 after a year and a further sum if they are promoted.
Left-back Painter, 20, has impressed in a three-month loan spell at the Liberty Stadium and Swans manager Kenny Jackett was keen on a permanent deal.
"I'm delighted and glad to get it all sorted after a lot of talking between the clubs," Painter told BBC Sport.
"I can just concentrate on the football now. As soon as I came to Swansea I knew it was a massive club and the one I wanted to be at."
Painter originally arrived at the Liberty Stadium in November as Jackett was keen to bolster his back-four for their promotion chase.
That task became more pressing after Swansea reluctantly accepted a transfer request from Izzy Iriekpen.
The 24-year-old former West Ham trainee has made 108 league appearances for the Swans since joining on a free transfer in August 2003.
But Iriekpen, whose contract expires at the end of the season, has only featured sporadically in the first team since being fined by the club after his arrest outside a Swansea nightclub in November.
"At 24 I need to be playing and not sitting on the bench," Iriekpen told the club's official website.
"It's a footballing decision. I don't really want to go and I've loved my time at Swansea.
"But at the end of the day I need to be playing football."
Several clubs have declared an interest in the player but no formal offer has been made.