The former England boxer Kelvin Bilal Fawaz, who was arrested and sent to an immigration removal centre last month, has been released after his lawyers threatened to launch legal action over his unlawful detention.

The 31-year-old, who was brought to the UK from Nigeria as a child 17 years ago and forced into domestic servitude, was sent to Brook House immigration removal centre.

The boxer, who represented England at amateur level six times, has been battling to establish his nationality and immigration status since the period of discretionary leave he was granted as a child expired when he turned 18.

“These past weeks in detention have been excruciating,” Fawaz said. “I’ve been self-harming just to try and release some of the stress. I couldn’t eat and was having anxiety attacks. I only got out because my lawyers threatened to sue the government and now we are looking at what legal action we could take.”

It is the second time Fawaz has been detained under immigration powers. In 2017 he was held at Tinsley House immigration removal centre where he was identified as an adult “at risk” on mental health grounds.

Duncan Lewis, the law firm representing him, said under government policy he should not have been arrested and incarcerated again. It said the firm only managed to get the boxer released after threatening to launch legal action.

The basis for his detention is also being contested. Fawaz was told he was being detained pending an interview with the Nigerian High Commission, although he had been interviewed twice, Fawaz said. The Nigerian government has denied that Fawaz is a citizen and turned down his application for a travel document.

Since he turned 18, the Home Office has refused to accept Fawaz’s application to be considered stateless. It has repeatedly delayed taking key decisions on his immigration status, leaving him unable to work and impoverished.

Fawaz said his mental health sharply deteriorated in the weeks during his detention and that he lived in terror of being arrested again.

“They detained me without warning to repeat the same interview I’ve already done twice,” he said.

Ahmed Aydeed, a director at Duncan Lewis and part of the team representing Fawaz, said the decision to detain him for a second time was baseless.

“Whilst in immigration detention in 2017, the Home Office accepted that our client was an ‘at risk’ adult, yet they arrested and detained him again for an interview that could have been done while he was at liberty.

“They did this knowing that detention was likely to have a severely detrimental effect on his mental health. It is callous disregard for someone’s health and right to liberty,” Aydeed said.

Despite the Home Office refusing to issue him with a work permit, Fawaz has built up a stellar amateur boxing career at the Stonebridge Boxing Club in north London. Although he has represented England at the amateur level, the Home Office refused to let him represent Great Britain in the Olympics.

Fawaz’s case made headlines when he was first arrested in 2017. Since then, some of the biggest names in the sport has appealed to the Home Office on his behalf, including the boxing manager Frank Warren. Former boxing champion Barry McGuigan wrote to the Home Office in 2014 praising Fawaz’s “exceptional talent” and offering him a £230,000 contract.

Duncan Lewis said it was now attempting to regularise the boxer’s immigration status and argued he should be allowed to remain in the UK.

In a statement, the Home Office said: “We carefully consider all representations made in relation to a case and should further claims be made, have a duty to grant these appropriate consideration. It is standard practice to manage individuals in the community while this consideration continues.”