THE Government dramatically cancelled a controversial deal to train prison staff in Saudi Arabia after an outcry.

The issue had been looming since Michael Gove became the Justice Secretary after the May election. He said at the time that he was cancelling any deals through Just Solutions International, but he also wanted the prisons deal with the Saudis to be cancelled.

Sources familiar with the deal said that a robust exchange of views followed between the Justice Secretary -- who had inherited the deal signed by his predecessor Chris Grayling -- and the Foreign Secretary Philip Hammond.

The latter argued that to cancel would have adverse repercussions for the UK’s reputation.

After a stand-off, the prisons deal, worth £5.9 million, was given the go-ahead by Downing Street.

However, it then became a much more pressing issue when new Labour leader Jeremy Corbyn issued a direct appeal to the Prime Minister on the issue during his maiden speech to the Labour Party Conference.

Days after that a bishop questioned the Government on its commercial relations with Saudi Arabia in a House of Lords question. That question has yet to be answered.

This afternoon, in a dramatic U-turn, the Justice Secretary announced that the contract with Saudi Arabia would now be cancelled. That announcement will raise questions about the Government’s foreign policy.

Leaked cables earlier in the year revealed that Britain had secured a deal with Saudi Arabia to ensure that the Arab State won the chairmanship of the UN Human Rights Commission, despite its record. Some observers claim that Riyadh has executed more people in the last year than the Islamic State.

That record came under further scrutiny today as the case was raised of Karl Andree, who is facing 350 lashes for being in possession of home-made wine.

A Saudi source denied that the lashes punishment was true.

The separate case of Ali Muhammad al-Nimr, a teenager who is facing crucifixion for attending a protest rally, was also raised by Jeremy Corbyn in his Brighton speech.

But one Middle East expert warned that David Cameron was in a ‘lose-lose’ situation.

Dr Johan Franzenfrom the UEA'sSchool of History said: “Given recent allegations of a deal to help Saudi Arabia to achieve the chairmanship of the UN Human Rights Committee, Britain’s Prime Minister David Cameron is likely to be under pressure to act strongly to secure the release of Mr Andree.

If not, the relationship will come under scrutiny once more.

“If, however, Mr Cameron is able to secure Mr Andree’s release, questions relating to other Saudi prisoners, such as Raif Badawi and Ali Muhammad Baqer al-Nimr, will undoubtedly be asked. For Cameron it is a lose-lose situation.”

A Government spokesman said today that the cancellation of the prisons deal -- that was due to provide a ‘training needs analysis’ for Saudi prison staff -- was unrelated to the Andree case.