Saudi Arabia has been a key western ally in the Middle East since World War II. Early in his first term as US president, Barack Obama even bowed, quite controversially, before the late Saudi king Abdullah.

But this is a country that’s set to resume flogging a democracy-minded blogger. Raif Badawi was recently awarded the Andre Sakarov human rights award. Badawi has endured 50 of 1000 lashes.

The Saudis also plan to behead then crucify Ali al-Nimr. His crime: protesting for democracy when he was 17 years old.

And Human Rights Watch reports that in 2015, the Saudis have approved more than 100 beheadings—more, according to The Guardian, than Islamic State has carried out. So could Iran end up a preferable, albeit imperfect ally?

Dr Rodger Shanahan is a research fellow at the Lowy Institute and was an Australian diplomat in Saudi Arabia. How does he think Saudi Arabia, with its appalling human rights record, ended up on the United Nations Human Rights Council?