Northampton Town have signed goalkeeper Adam Smith on a two-year deal – nine days after Smith was sacked by Leicester City for taking part in a racist sex film on a post-season tour to Thailand.

City sacked three players – the others being James Pearson, the son of the club’s manager, Nigel Pearson, and Tom Hopper – following an investigation into allegations that they had racially abused and made other offensive comments to women with whom they were engaging in sex acts in a Thai hotel room.

Among the allegations was that a player had called one of the women a “slit eye”. The video was alleged to have later been shared with friends in the UK.

The players issued swift apologies, but City, owned by the Thai billionaire Vichai Srivaddhanaprabha and his son Aiyawatt, sacked the three and restated their commitment to “promoting a positive message of community and family values and equality”.

Announcing the decision to sign the 22-year-old Smith, subject to a medical, the Northampton manager, Chris Wilder, acknowledged the deal would be controversial. He told the club website: “I’m aware this signing will create debate.

Adam Smith on joining Northampton Town: https://t.co/IKqVE136v0 — Northampton Town (@ntfc) June 26, 2015

“Adam was involved in an incident at Leicester was very wrong and he knows that better than anyone. He paid a price for that, he has apologised and is ashamed of what happened.

“But we also live in a society where, as long as people show genuine remorse, admit their mistake, learn from it and apologise then they deserve a second chance. Adam knows that and he is determined to take this chance.

“He is a very good goalkeeper, and one who needs to be in and around a first team place to push himself forward and I am sure he will prove a good addition.”

Smith said: “I got myself in a situation I am deeply ashamed of, and I am desperately sorry for that. I know the club here do a lot of anti-racism work and have a proud record in that area and I am keen to help the club with that.

“I am really sorry for what I was involved in but I need to put that stupid mistake behind me. I am really grateful for the second chance I have been offered here and I am determined to make the most of it.”