The lead elephant was called Mahmud. He had belonged to the Negus of Abyssinia. Abrahah, the ruler of the Yemen, had asked for him especially because he wanted him to lead the other elephants and the army when they attacked Makkah. Some people say that the army was as big as 60,000 men and that there were thirteen elephants, although some say there were only nine.
This took place in 570 CE (of the Christian Era) at a place outside of Makkah called Dhu’l-Ghumays. Abrahah gave the army the command to attack. Mahmud’s keeper, Unays, had trained him to obey some orders like ‘sit!’, ‘go forward!’, and ‘turn around!’ He told him to advance.
However, they had also captured an Arab chief called Nufayl. To save his life, Nufayl had been their guide across the desert. Nufayl had learnt some of Mahmud’s commands and he secretly told Mahmud to kneel. That explains why at first Mahmud sat down, but it does not explain why he would not go towards the Ka’bah no matter what they did.
Whenever the army turned its face away from the Ka’bah, Mahmud too would hurry to go in that direction. When they faced in the direction of the Ka’bah, he stood still even if they beat him.