He fought for weeks alongside elite Israeli troops in Gaza and appeared in a frontline photograph next to Prime Minister Benjamin Netanyahu, but Roi Yifrah now stands accused of impersonating a soldier.
Yifrah, 35, apparently never served in the Israeli army but managed to make his way to the Gaza Strip, where Israel is waging a fierce military campaign against the Palestinian territory's Hamas rulers.
Israeli police said Yifrah, a Tel Aviv resident, was arrested on December 17 on charges of impersonating a member of the security forces and stealing weapons.
In the weeks after Hamas's deadly October 7 attacks on southern Israel, Yifrah pretended to be a member of Yamam, the border police's elite counter-terrorism force, according to his indictment in a local court.
On one occasion he even claimed to be a member of the internal security agency Shin Bet.
Yifrah somehow managed to elude security screening when Netanyahu visited troops on the frontlines last week and posed for a photograph next to him dressed in full battle gear.
Yifrah had "never done military service and never had any role in Yamam or the Shin Bet", the indictment said.
Police said officers seized weapons from his apartment, car and his mother's home, including an assault rifle, stun grenades, explosive charges, bullets, military computers and a drone.
According to the indictment, Yifrah stole army property and misled army officials in order to receive additional equipment "fraudulently and under grave circumstances".
The Israeli military did not immediately comment on the case.
But Yifrah's attorney, Eitan Sabag, defended his client, saying he rushed to southern Israel on October 7 as a volunteer medic.
"He gave first aid, and saved dozens, if not more, wounded," Sabag told Kan public radio.
Sabag said Yifrah fought alongside elite Israeli troops in Gaza's Al-Rimal neighbourhood, one of the key battlegrounds in the territory.
"Why would a person who wants to steal a gun take the gun he allegedly stole and go deep into Gaza... to the most dangerous places?" Sabag said.
Yifrah had been previously charged for illegally possessing weapons and drugs, the Ynet news website reported