A gay rugby player facing deportation to Kenya, where he fears he will be the victim of persecution and violence because of his sexuality, has had a last-minute reprieve from detention.

Ken Macharia, a member of Bristol Bisons gay and inclusive rugby club, had expected to be detained when he reported to a police station in Somerset on Thursday.

A dozen fellow club members, wearing their distinctive pink and black shirts, walked with him into the police station in Bridgwater chanting: “Bisons! Bisons!” as a sound system blasted out Gloria Gaynor’s anthem I Am What I Am.

Macharia, who has lived in the UK for nine years, and whose mother lives in Bristol, was allowed to leave the police station but faces being detained at any moment after a fresh claim for asylum was rejected earlier this week.

The 39-year-old expressed relief and said he was looking forward to returning to his home in Somerset. He said: “I’m relieved and happy to be going home. I’m looking forward to having a rest. It’s been a very stressful time. But I don’t have permission to stay in the UK and my position is very precarious.”

By the time he arrived at Bridgwater police station, more than 150,000 people had signed a petition calling for Macharia to be allowed to stay in the UK and more than £10,000 had been raised towards legal fees that he hopes will allow him to take his case to judicial review.

Macharia is struggling to understand why the British government apparently accepts that gay people are at risk of persecution in Kenya but is intent on sending him there.

“I don’t understand it,” he said. “Same-sex intimacy in Kenya is illegal. Police harass and blackmail gay people. There is a risk of mob violence. There is discrimination with people being fired from work and evicted by landlords. I don’t understand the Home Office’s stance.

“I’ve been here more than nine years, my home is here. I have a great group of friends who sacrifice a lot for me. I can be who I am in the UK. I don’t have to hide my sexuality. England is the best place for me, especially Bristol.”

The high-profile nature of the campaign to keep him in the UK makes returning even more difficult, he argues. “Living in a closeted life is no longer an option for me. I don’t know what I could do.”

Macharia has been a member of the Bisons club for more than three years. He cannot join them at a tournament they are playing in this weekend in Dublin because he fears he would not be allowed back into the UK.

Club captain Murray Jones said the fight would go on. “Ken’s still very much at risk of being sent to Kenya, which is not his home. He could be arrested at any time, taken to Heathrow and flown to Kenya. That must not happen. He’s part of our team and part of our community.”

Murray said it was “disgusting” that the rainbow flag was prominent on the Home Office’s Twitter feed when it was acting as it was towards Macharia. “The UK should be at the forefront of LGBT rights. If we led, others would follow,” he said.

A Home Office decision letter sent to Macharia’s solicitor acknowledged that gay sex in Kenya was punishable by up to 21 years in prison and that LGBT people have reportedly been subjected to harassment, blackmail and rape.

However, the letter added: “Whilst same-sexual activity between men has been criminalised with a penalty of up to 21 years in prison this law is rarely applied and the objective evidence does not establish that LGBT persons are likely to be subjected to persecution or serious harm.”

A Home Office spokesperson said: “This government has a proud record of providing protection for asylum seekers fleeing persecution because of their sexual orientation or gender identity. All decisions on claims based on sexual orientation are subject to an additional safeguard and reviewed by a second experienced caseworker. We cannot comment on an individual case whilst there is ongoing legal action.”

The Home Office’s decision comes after Kenya’s high court last month upheld laws that criminalise gay sex in what was described by a campaigner as a “a sad day for the rule of law and human rights”.

Macharia, a mechanical design engineer, first claimed asylum in May 2016, having arrived in the UK on a student visa in 2009.