A major transgender rights case that was due to be heard at the US Supreme Court has been cancelled after Donald Trump rescinded one of President Obama's anti-discrimination laws.

The justices had been due to hear the case of Gavin Grimm, a 17-year-old Virginia high school student who was assigned female at birth but identifies as male.

He sued his local school board to win the right to use the public school's boys' bathroom and a federal appeals court in Richmond, Virginia, last year ruled in his favour on the basis of Barack Obama's interpretation of the law.

But after Mr Trump rescinded his predecessor's order in February, the Supreme Court concluded it was no longer worth hearing the case.

The appeals court ruling, which was the first of its kind, has now been thrown out and the court, in Richmond is now expected to hear the case again and reassess the dispute.

"Obviously this is not what we wanted, and it's disappointing it's going to drag this conversation out even longer," Mr Grimm said, adding: "If it took 10 years I would stick with it."

The Supreme Court's rejection of the case, is the latest legal fallout from Mr Trump's extensive use of executive power in the opening weeks of his presidency.

Mr Grimm had argued that his school's refusal violated a federal anti-discrimination law called Title IX of the Education Amendments of 1972 and the US Constitution's guarantee of equal protection under the law.

With Mr Obama's interpretation of the anti-discrimination law now void, the Supreme Court was able to sidestep what would have been its first ruling on transgender rights.

Caitlyn Jenner takes on Trump over transgender issue

The former US leader's May 2016 guidance said that transgender students were protected under Title IX, which bars sex discrimination in education.

However, the Trump administration's move left the bathroom access decision to the states.

Both sides in Mr Grimm's case had asked the Supreme Court justices to decide the case despite Mr Trump's rollback.

Lonely road: Why school is hell for transgender pupils Show all 2 1 /2 Lonely road: Why school is hell for transgender pupils Lonely road: Why school is hell for transgender pupils Many schools experience difficulties when faced with a pupil who does not fit neatly in to the 'boy' or 'girl' box © Alamy Lonely road: Why school is hell for transgender pupils Urgent reform: Stephen Whittle, a transgender professor, is pushing for greater protection of trans pupils in schools © Warren Smith

Kerri Kupec, a lawyer with conservative Christian legal group, Alliance Defending Freedom, which backed the school board, said the move by the justices was expected in light of Mr Trump's action, but the appeals court should clarify the situation.

“The 4th Circuit should affirm the plain meaning of Title IX, which protects boys' and girls' privacy in locker rooms, showers and restrooms. School officials should be free to protect their students' privacy, safety and dignity without federal government interference,” she said.

The school board said in a statement it “looks forward to explaining why its commonsense restroom and locker room policy is legal under the Constitution and federal law” when the case is taken up again by the 4th Circuit. The school board policy requires students to use the bathroom that corresponds with the gender they were assigned at birth.

The issue of allowing transgender people to use public bathrooms that correspond to their gender identity has become a major focus in the long US battle over lesbian, gay, bisexual and transgender rights. Especially since Mr Trump began eroding rights.

“This is a detour, not the end of the road, and we'll continue to fight for Gavin and other transgender people to ensure that they are treated with the dignity and respect they deserve,” said Joshua Block, an American Civil Liberties Union lawyer who represents Mr Grimm.