NICOSIA, Cyprus — A Greek Cypriot army captain was sentenced to seven life imprisonment terms on Monday after pleading guilty to killing five women and two children in a three-year murder spree in which he preyed on his victims online.

The case incited outrage and horror on an island where serious crime is relatively rare, and forced the resignation of the justice minister and firing of the police chief.

Nicos Metaxas, 35, pleaded guilty to 12 charges relating to the premeditated murder and abduction of the seven women, who came from the Philippines, Romania and Nepal, between September 2016 and July 2018. The two children, 6 and 8, were daughters of two of the women.

The sentence passed down by the court is the toughest ever imposed by the Cypriot justice system.

Mr. Metaxas was taken under heavy security to a courthouse in the capital Nicosia wearing a bulletproof vest, and appeared without a lawyer.