(Getty)

Mike Huckabee has lashed out at Republicans who rebelled against an amendment to discriminate against transgender people in the US armed forces.

Last week a GOP-backed attempt to limit the rights of transgender people serving in the military failed in the House of Representatives, on a knife-edge vote.

Rep. Vicky Hartzler had proposed an amendment to the must-pass 2018 National Defense Authorization Act, which would have prevented transgender people serving in the armed forces from accessing transition-related care.

Although Republicans hold a majority, the amendment was defeated in an extremely close 214-209 vote, after 24 Republicans broke the party consensus to vote against.

In a blog post this week, anti-LGBT Republican Mike Huckabee attacked his colleagues who voted against the law.

The former Governor of Arkansas said: “Thanks to the votes of 24 Republicans, the House rejected an amendment to the 2018 National Defense Authorization Act, proposed by Vicky Hartzler of Missouri, which would have stopped the military from funding treatment relating to gender transition, including sex-change surgery, for members of the military and their families.”

He added: “As long as the amendment did make it to the floor, it seems unbelievable that 24 Republicans voted it down. Six others didn’t vote at all.”

Huckabee, who has a history of anti-LGBT ‘jokes’, couldn’t resist a quip about a Republican colleague who is in intensive care after surviving a shooting.

He said: “One of those [who did not vote] was Majority Whip Steve Scalise, but he had a good reason: he’s still recovering from surgery himself, the kind that is definitely not elective.”

The failed Presidential wannabe recently smeared the sexuality of one of his GOP colleagues, after they spoke out against Donald Trump.

Huckabee has a long history of anti-LGBT animus.

He rallied behind Kentucky clerk Kim Davis, compared anti-LGBT activists to Martin Luther King, labelled gay parents ‘destructive’, and ‘joked’ that he wishes he were transgender to spy on teenage girls in the shower.

In a previous ‘joke’ he said: “Your seven-year-old daughter, if she goes into the restroom, cannot be offended and you can’t be offended if she’s greeted there by a 42-year-old man who feels more like a woman than he does a man.

“Now I wish that someone told me that when I was in high school that I could have felt like a woman when it came time to take showers in PE.

“I’m pretty sure that I would have found my feminine side and said, ‘Coach, I think I’d rather shower with the girls today’.”