A 41-year-old man has been executed in Yemen after he was convicted of raping and killing a three-year-old girl.

Muhammad al-Maghrabi was shot to death with an AK-style rifle in the capital of Sanaa on Monday.

Pictures show Maghrabi laying on the floor with his hands bound behind his back before a soldier standing over him opens fire.

Muhammad al-Maghrabi, 41, was shot dead in the Yemeni capital of Sanaa on Monday

Maghrabi was killed after being convicted of raping and murdering a three-year-old girl

He was brought to the main square in Sanaa in an armoured van before soldiers laid him on the floor to carry out the sentence

As a crowd of thousands watched, one soldier fired shots through Maghrabi's back, killing him

The execution was watched by a crowd of thousands who gathered in the city's main square.

Maghrabi was brought there by prison van before being laid down on a rug where he was fatally shot through the back.

Television cameras broadcast the sentence across the country while viewers filmed it on their phones.

Sharia law is the source of all legislation in Yemen, according to a US State Department report.

Under the law murder is punishable by the death sentence, thought the family of the victim do have the power to lessen the punishment.

While beheading is common, sharia does not specify how the death sentence should be carried out.

Onlookers filmed the execution on their phones while a television crew gathered around to get the best angle (rear left)

Thousands of people including those carrying cameras on selfie sticks gathered to watch the execution in Sanaa on Monday

Maghrabi steps out of the prison van and into the square where he was then shot dead