A Moscow gang who killed homeless people to “cleanse the city” were handed jail terms ranging from nine and a half years to life imprisonment on Monday.

Investigators said the four men and one woman met on the internet and referred to their spate murders as a “purge,” the state-run RIA Novosti news agency reported.

Yuliya Ivanova, an Investigative Committee official, said the gang singled out homeless people in the Moscow and Yaroslavl regions from July 2014 to February 2015. A jury earlier declared the five gang members guilty of committing 14 murders.

“The murders were committed with particular brutality in sparsely-populated or deserted places, primarily at night,” Ivanova said. “As weapons, the conspirators used knives, hammers, brass knuckles and other objects.”

The state-owned 360TV news said the head of the gang, Pavel Voitov, flashed Nazi symbols during the trial and came to the courtroom on one occasion wearing a t-shirt with the slogan “Only Hate.”

Voitov and two other defendants were found to have psychiatric illnesses.