Pop star Sir Elton John has penned an essay slamming North Carolina’s “dangerous” bill which forces transgender people to use bathrooms which match the gender they were assigned at birth.

Sir Elton wrote a blog on Tuesday for The Hill in which he said the House Bill 2 (HB 2) law is discriminatory and the state is wasting millions of dollars to defend it.

Sir Elton John penned a heartfelt blog post about North Carolina's anti-LGBT law (Daniel Leal-Olivas/PA)Sir Elton John penned a heartfelt blog post about North Carolina’s anti-LGBT law (Daniel Leal-Olivas/PA)

Addressing North Carolina Governor Pat McCrory for signing the bill, he attacked him for saying he had never met a transgender person.

The governor took that statement back, but Sir Elton said he sent the clear message that the experiences of transgender people have no place in a debate about their rights. McCrory did not immediately respond to a request for comment.

Elton wrote: “This brand of ignorance deliberately shuts out the perspective of an already marginalized community. It’s dangerous, and it goes beyond bathrooms.

North Carolina Governor Pat McCrory (Gerry Broome/AP/PA)North Carolina Governor Pat McCrory (Gerry Broome/AP/PA)

“As the father of two children, I would hope their world is free of discriminatory, hateful legislation like North Carolina’s.”

The 69-year-old musician and his husband David Furnish have two sons together, Elijah and Zachary.

He continued: “Forcing transgender people to use the bathroom of a gender with which they don’t identify isn’t just inconvenient or impractical. For many, especially young students still grappling with their transition, it can be traumatic, and at worst, unsafe.”

David Furnish and Elton JohnDavid Furnish and Elton John have two children (David Crotty/AP)

He concluded: “McCrory and others who support these discriminatory bathroom bills need to reverse course, but moreover, they need a lesson in compassion.”