This may have been to stop soldiers on horseback storming into the church.
This could have been to stop soldiers on their horses from entering. 
mnli hypothesis: This could have been to stop soldiers on their horses from entering.  premise: This may have been to stop soldiers on horseback storming into the church.