Salih bin Yateem bin Salih al-Qarni was beheaded in the southwestern city of Abha, the official Saudi Press Agency said.
Qarni was intially arrested on other charges and was transported in an official vehicle by the soldier and a member of the Muttawa religious police.
“He shot them with a gun that he was carrying,” the SPA said, without explaining how he obtained the weapon.
After stealing the keys from the security officer driving the vehicle, Qarni chewed some narcotic qat “and disguised himself in women’s clothing” in an attempt to flee, but was recaptured, it said.
Saudi women are required to cover from head to toe, often with only their eyes exposed.
The report did not say when the escape bid occurred.
Qarni is the latest of 69 Saudis and foreigners executed in the kingdom this year, despite international concern.
Rape, murder, apostasy, drug trafficking and armed robbery are all punishable by death under the kingdom’s strict version of Islamic sharia law. -AFP