then , as they approached the last turn in the road , just outside the enclosure of the customs house , they were suddenly confronted by a band of mounted horsemen , armed with long-barreled muskets .