Afek came out as gay (Wikimedia Commons)

One of the highest ranking members of the Israeli military has publicly come out as gay, in an unprecedented move.

Sharon Afek is a lawyer who serves in the Military Advocate General as a Brigadier-general, which is third-highest rank in the country’s army.

No-one in the Israeli Defence Forces (IDF) with this rank or higher has ever come out.

In an interview with the Israel Bar Association’s magazine, Afek said he used to be scared of revealing his sexuality, but wanted to do so now because “it’s important for me to be a role model.

“When I was a young officer, times were different,” he explained.

“I was afraid that this would work against me and that I would truly hit a glass ceiling, but I never encountered discrimination, either positive or negative, because of this since beginning my service in the IDF.

“To my delight, this didn’t cause any special interest, and I never felt my sexual orientation was a factor in any judgments about me, which is a good thing.”

He said he hoped his example would show LGBT teenagers preparing to join the IDF – which has a policy of mandatory conscription – that they can belong in the military.

“Even today, in 2017, we encounter expressions of ignorance and hatred of the other,” he said.

“It’s important for me that these young men and women know there’s no glass ceiling limiting them in the IDF. Their success depends on them, and them alone.

“It’s possible for every person to reach the very top of the pyramid in his field, according to his abilities,” Afek stated.

“The IDF is an army of the people, embracing anyone who wishes to contribute and advance in it, and I will be happy if many men and women follow in my footsteps.”

Tel Aviv, one of Israel’s biggest cities, is set to host the world’s first major bisexual pride march this summer.

The event, which is the largest LGBT event in the Middle East, takes place from June 3 in Israel.

Unlike much of the Middle East and Asia, Israel – and Tel Aviv in particular – has become renowned for its LGBT-friendly culture.

The city has been dubbed “the world’s gayest city” by The Boston Globe and “the gay capital of the Middle East” by Out Magazine.