A British soldier who defied a direct order to remove the SIM card from his cellphone before deploying to Estonia later had his phone hacked and was blackmailed with intimate photos stolen from the device, according to a British appeals court document.

The soldier, Daniel Barton-Kennedy, was court-martialed for disobeying a lawful command. He pled guilty, was reduced in rank, and was ordered to serve 10 months in detention. The case was first reported by the Estonian newspaper Eesti Ekspress, which shared a 21-page appeals court document with Ars Technica.

According to the document, the episode began in January of this year. At the time, Barton-Kennedy was a corporal with more than seven years of service, assigned to the 1st Battalion of the Duke of Lancaster Regiment of the British Army.

His unit was sent to Estonia to take part in Exercise Eastern Warrior, held in Tapa, a town roughly halfway between the capital, Tallinn, and the border with Russia. The deployment area sits approximately 90 miles west of Russian territory.

Before leaving the United Kingdom, Barton-Kennedy and other members of his unit were briefed on January 7 about operational security requirements. They were given specific instructions to "remove SIM cards and switch off location settings and to use a trusted virtual private network on all personal electronic devices."

After the unit arrived in Estonia several days later, soldiers received additional briefings and reminders of the same policy. Despite the repeated warnings, Barton-Kennedy ignored the instruction and kept the SIM card in his phone.

That refusal to follow the security protocol left his device exposed. His phone was hacked, and nude photos of himself were taken from it and used to blackmail him, the court document shows.

The breach ultimately led to military discipline. In addition to his guilty plea, reduction in rank, and 10-month detention sentence, the case has become a cautionary example of how lapses in basic operational security can be exploited against service members deployed near adversarial borders.