The government is re-examining its policy on transgender inmates following the death of two trans women at all-male prisons in the UK.

Campaigners say the process of allocating transgender people to prison can pose a risk to their safety and wellbeing.

What are the problems involved in assigning trans people to the UK's prison system?

Below are answers to some of the main questions around the issue.

How are trans people assigned to prisons?

Decisions over whether to send people to male or female prisons depend on their 'legal' gender, which is usually determined through a birth certificate or gender recognition certificate.

For transgender people whose gender is not yet legally recognised through these documents, they could be sent to prisons housing people of a different gender.

Rules are set out by the Ministry of Justice (MoJ) Care and Management of Transsexual Prisoners guidelines.

The two trans women who died - Vikki Thompson, 21, and Joanne Latham, 38 - both identified as women but did not have gender recognition certificates.

They were placed in all-male prisons in Leeds and Milton Keynes respectively.

What happened?

Image copyright Robert Steele Image caption Boyfriend Robert Steele said Vikki Thompson should not have been put into an all-male jail

Vikki Thompson was found dead at HMP Leeds on 13 November. Her friends said she told them she would kill herself if she was sent to a male prison.

A prison officer found Joanne Latham hanged at HMP Woodhill on 27 November.

Their deaths came after transgender woman Tara Hudson, 26, successfully campaigned to be transferred from an all-male prison, with a petition signed by more than 150,000 people.

Are there any exceptions to MoJ rules?

The MoJ said there are several measures to bypass the usual process of assigning prisoners by gender, for instance:

If the person's emotional wellbeing is a concern when deciding where they serve their sentence, case reviews can be held to review circumstances and make recommendations

People who are "sufficiently advanced in the gender reassignment process" can be placed "in the estate of their acquired gender, even if the law does not yet recognise they are of their acquired gender"

People who obtain a gender recognition certificate while in prison "should in most cases be transferred to the estate of their acquired gender"

Source: MoJ The Care and Management of Transsexual Prisoners guidelines.

How many transgender inmates are there?

The government does not currently keep figures on the number of transgender people in prison, but estimates suggest there are at least 80 trans inmates in the UK system.

According to the latest Ministry of Justice figures, 85,977 prisoners are men and 3,935 prisoners are female.

What are campaigners saying?

Alex Kaye from SafeT, an organisation which represents transgender people, said he hoped the deaths would bring about a change in the law.

"Any woman would not be happy to be in a male prison regardless of any gender identity history," he said.

Journalist and LGBT campaigner Jane Fae told the BBC: "My serious concern is this is blowing the lid off something that is going on - that for a very long time trans prisoners have not been treated well within the system, that the rules that exist are being overridden".

"And this is leading to a massive, massive amount of depression and potentially, in some cases, suicidal feelings."

She also said there were instances of trans prisoners being sexually assaulted or raped in men's prisons.

What changes are being made?