Warning: Graphic content

They never saw it coming.

Video footage obtained by The Post shows the gruesome moment Maulama Akonjee, 55, and his friend Thara Uddin, 64, were shot in the back of their heads by a lone gunman on foot.

The footage shows the pair walking together in traditional Muslim clothing near the corner of Liberty Avenue and 79th Street in Ozone Park when a tall, thin man walked up behind them.

The short-haired, bearded suspect, who also wore octagonal-framed eye glasses, slowed down as he reached them – and took aim with the black revolver in his hand.

He then paused for an instant and walked away.

The shots were filed quickly. As the holy men fell face-first into the sidewalk, the suspect fled and jumped into a waiting car.

The slaying happened as the two men walked home after prayers from the Al-Furqan mosque around 2 p.m. Saturday.

“My father only wanted peace,” the imam’s son, Niam Akonjee, 23, told The Post.

“I want whoever did this to come forward for justice. That is all we ask, for justice and to know why he killed my father.”