The Israel Defense Forces promoted its top lawyer, Sharon Afek, to major general on Thursday, making him the country’s first openly gay person to hold that rank and reinforcing the significance of his position in the military.

“The rank promotion expresses the great responsibility of the military advocate general to act, shoulder to shoulder with commanders, in order to ensure that the IDF is able to fulfill its goal and win, without giving up on the rule of law,” Afek said during the ceremony.

“Even in the times of the most complicated and difficult fighting, the IDF was strict, is strict and will be strict in remaining within the bounds of law and justice. This dedication of the IDF to law and justice is a source of strength and not weakness. It allows us to operate as a people’s army in a democratic state and to preserve the trust of the public,” he said.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The military advocate general received his promotion during a small event at the IDF’s Tel Aviv headquarters, known as the Kirya. The insignia were placed upon his shoulders by his father and by IDF Chief of Staff Gadi Eisenkot.

The decision to promote Afek to the rank of major general was made earlier this year as the military determined that it was more fitting for the position of military advocate general.

In 2015, the military changed the position from one held by a major general to one held by a brigadier general as part of a budget reduction effort by the IDF. Earlier this year, the IDF announced that it was reversing that decision and also establishing a fixed tenure for the position, which had previously been unspecified. Some military advocate generals held the position for four years, others for eight.

The position of military advocate general now has a tenure of five years, with the option for a sixth, “depending on the needs of the IDF chief of staff and the agreement of the military advocate general,” the army said at the time.

In the future, military advocate generals will not immediately be given the rank of major general, but will receive it only after serving in the position for approximately three years, as in Afek’s case.

IDF chief Eisenkot decided to reverse the policy, with the approval of the defense minister, in light of the growing importance of international law in modern warfare, according to the IDF.

“These recommendations show the central and significant position of the MAG in the army,” the military said.

That could be seen clearly in the recent discussions over the legality of the IDF’s use of lethal force in the clashes along the Gaza border, which reached the High Court of Justice.

The military added that the promotion and extended tenure was encouraged by the Ciechanover Commission, a fact-finding probe launched following the 2014 Gaza war to investigate how the military handled the campaign from an international law perspective.

Afek served in the army in law-related positions for 25 years before being appointed military advocate general in October 2015, taking over for Maj. Gen. (res.) Danny Efroni.

During his nearly three years in office, Afek has dealt with a number of high-profile cases, most notably the so-called Hebron shooting, in which soldier Elor Azaria shot to death a subdued Palestinian attacker..

When Afek took over as military advocate general in 2015, he became the first openly gay member of the IDF General Staff.

In an interview with the Israeli Bar Association last year, Afek said it was an important step in showing members of the LGBT community that the army would accept them.

“It’s important for me to act as a role model,” he said. “Even today, in the year 2017, we still encounter manifestations of ignorance and hatred of others. It’s important to me that young men and women know that there are no glass ceilings in the IDF that limit them.”