Attorney General Yehuda Weinstein on Sunday approved the promotion of Northern Command Maj. Gen. Gadi Eizenkot to IDF deputy chief of General Staff, saying he found no legal impediment to the appointment.

The decision reverses Weinstein’s earlier misgivings about the timing of the move ahead of January elections. In the past, Weinstein has instructed that appointments to senior positions not be made during campaign season.

Following the announcement of Eizenkot’s appointment last month, the Forum for the Land of Israel, a right-wing legal advocacy group, petitioned the High Court of Justice to freeze the promotion on the grounds that it was tainted by politics because of its timing and Eizenkot’s perceived closeness to outgoing Defense Minister Ehud Barak.

The pick of Eizenkot, who served as Barak’s military aide during the latter’s term as prime minister and defense minister in 1999, ended months of speculation as to who would replace Maj. Gen. Yair Naveh in the position.

In October, the attorney general paved the way for the appointment when he said that Eizenkot’s marginal role in the so-called Harpaz affair, which involved a reportedly forged document meant to smear a candidate for the IDF chief position, was not serious enough to disqualify him.

The post is seen as a feeder into the army’s top post, currently occupied by Lt. Gen. Benny Gantz.

Eizenkot finished his stint commanding the army’s northern forces last year, taking leave after a decades-long military career that saw him command the Golani Brigade and serve as military secretary to Barak when he was prime minister and defense minister in 1999.

The major general was considered to be Gantz’s pick for the deputy job, and may take over Gantz’s post when the chief of staff steps down in three years. Maj. Gen. Avi Mizrahi was also considered for the post.

Naveh is expected to resign in the coming months.