A Mexican judge has ruled there is insufficient evidence to try four of the seven soldiers charged in the 2014 killing of 22 suspects, some of whom were apparently shot after they surrendered.

The ruling effectively would free a lieutenant and three soldiers who faced lesser charges of "actions improper to the public service" for allegedly not reporting the killings or trying to cover them up.

The judge, ruling on an appeal by the seven, agreed there was enough evidence to continuing holding trials for the three soldiers who allegedly directly carried out the killings.

The ruling was confirmed Monday by lawyer Juan Velasquez, who advised the soldiers' defense team, and by a federal official who was not authorized to be quoted by name.