when the entourage was within a few yards of the entrance to the port , the guard positioned himself in front of the pygmy , stood to attention , extended his spear at arms length to his right , and shouted , halt .