Judge Victor Arellano hasn't released the names of the defendants, saying he wants to respect "the principle of presumption of innocence."
The defendants were at Friday's court hearing but hid their faces. They have five days to appeal the judge's decision.
After the men's arrest, authorities said they had confessed to the crimes and given a complete account of the Feb. 4 attack. It took place at a beach house on the outskirts of Acapulco where 12 Spanish tourists and a Mexican woman were staying.