LONDON (AP) — A British man who joined a pro-Russian militia in Ukraine has been jailed for terrorism offenses, in the first U.K. prosecution over the conflict.

A judge on Friday sentenced Benjamin Stimson to five years and four months in prison.

Stimson went to Ukraine in 2015, later posting a picture of himself with an assault rifle on Facebook.

He was arrested on his return and admitted assisting others in committing acts of terrorism.

Prosecution lawyer Barnaby Jamieson said Stimson admitted “serving as an armed militiaman in an irregular force opposing the Ukrainian army,” although Judge David Stockdale said Stimson had not actually done any fighting.

Northwest England counterterrorism police chief Russ Jackson said he hoped the conviction “will send a message to all those who are even considering joining conflicts.”