The British government said on Tuesday it has pulled out of the bidding for a contract to provide training in Saudi Arabia's penal system.

A Downing Street spokesperson said: “This bid to provide the additional training to Saudi Arabia has been reviewed and the government has decided that it won’t be proceeding with the bid.

"The review has been ongoing following the decision that was announced earlier in September to close down the Just Solutions International branch of the Ministry of Justice that was providing some of these services.”

The £5.9m ($9m) contract was to provide a "training needs analysis" for the Saudi penal system.

However, the case of Karl Andree, a UK pensioner based in Saudi who was sentenced to 12 months in jail and 360 lashes for trafficking homemade alcohol, has apparently spurred the UK government to action.

Andree, who has lived and worked in Saudi for 25 years, is 74 years old and his family have warned that he would not survive a flogging at his age.

“This is an extremely concerning case,” said the spokeswoman. “We have been providing consular assistance to Mr Andree and to his family since he was first arrested. We have raised the case repeatedly in recent weeks.

“Given the ongoing concerns and the fact we would like to see more progress, the PM is writing today to the Saudis to further raise the case on the back of action that was already being taken by the Foreign Office and by ministers there.”

Saudi's criminal justice system has frequently come under criticism by human rights organisations, particularly over a number of recent cases involving minors.

Middle East Eye learned on Tuesday that two Saudis who have been sentenced to death were juveniles at the time of their arrest.

Mohammed Faisal al-Shuyoukh and Ali Saeed al-Rubh were both under the age of 18 when they were detained in 2012 for taking part in an anti-government protest in the Shia-dominated area of Qatif in the Eastern Province.

A Qatif-based source told MEE on condition of anonymity that Shuyoukh and Rubh were both sentenced to death on 11 October.

Five juveniles have now been sentenced to death in Saudi Arabia in 2015.

Jeremy Corbyn, the leader of the opposition Labour party, praised the u-turn but questioned the validity of the UK's longstanding relationship with the Kingdom.

“David Cameron has been shamed into a u-turn on this terrible contract, but why on earth was it set up in the first place?" he said in a statement. "We should be sending a strong message to repressive regimes that the UK is a beacon for human rights and that this contract bid is unacceptable in the 21st century, and would damage Britain's standing in the world.”

Corbyn has previously petitioned the prime minister over the case of Ali al-Nimr, a 17-year-old sentenced to beheading and crucifixion allegedly for taking part in protests in Qatif in 2012.

France announces $10bn Saudi arms deal

The UK controversy comes as France on Tuesday announced a series of deals worth 10 billion euros ($11.4 billion) with Saudi Arabia, reinforcing growing ties between the two countries.

Prime Minister Manuel Valls announced the deals on Twitter during a visit to Riyadh, saying they showed his government was "mobilised for our companies and employment".

The deals include contracts and letters of intent between the two countries, whose economic and political ties have been strengthening under President Francois Hollande.

There were few significant details immediately available on the deals, though one of the agreements was a Saudi order for 30 patrol boats.

The deals cover energy, health, food, satellites and infrastructure, according to the prime minister's office.

The announcement came during the third high-level visit by French officials to the world's biggest oil exporter this year.

France has been reinforcing links with the conservative kingdom - the Arab world's largest economy - despite persistent criticism from rights activists of the kingdom's record on civil liberties.

For Saudi Arabia, expanding ties with France are part of an effort to build alliances beyond its traditional defence partner the United States, to counter Riyadh's regional rival Iran.

Valls late on Monday opened a forum to promote commercial ties between firms from France and Saudi Arabia.

He is on a regional tour which earlier took him to Jordan and Egypt, along with Defence Minister Jean-Yves Le Drian.

Foreign Minister Laurent Fabius was also in Riyadh.

Valls's office said additional negotiations had begun for potential agreements in telecommunications and surveillance satellites.

Hollande came to Riyadh in January to pay his respects after the death of king Abdullah.

In May, he returned to become the first Western leader to attend a Gulf Cooperation Council summit.

The order for patrol boats is the latest in a series of weapons deals Paris has made in the region this year.