LONDON — A court in the United Arab Emirates on Wednesday sentenced a British academic to life in prison on spying charges, prompting a pledge from Prime Minister Theresa May of Britain that the issue would be raised “at the highest level” with the Emirati authorities.

The severity of the verdict stunned British officials, who had been reluctant to discuss the case in public in the hope that the Emirati authorities would settle the matter quietly after a high-level intervention by the British foreign secretary, Jeremy Hunt. British officials had also said that it was not their practice to comment on matters related to espionage.

The academic, Matthew Hedges, a 31-year-old postgraduate student at Durham University in northeastern England, was arrested in Dubai on May 5 as he was planning to fly out. Colleagues said he had been pursuing research for a doctorate on the effects of the so-called Arab Spring of 2011 on Emirati diplomacy.

But the response suggested that the Emirati authorities wanted to show other researchers that some lines of inquiry, which have not been publicly defined, were considered off limits. The Emirates largely sidestepped the pro-democracy protests that seized other Arab countries from North Africa to the Middle East in 2011.