In the battle around the body of Achilles, Odysseus drove back the Trojans, while Ajax was the one who finally carried the dead hero in the camp of the Achaeans. When the fighting stopped, the question arose what would become of the armour of Achilles, which was offered by Thetis to the most valiant warrior. The Achaeans, following the advice of Nestor sent spies to hear the Trojans. They saw a young Trojan girl to say that Ajax was the bravest, but another woman replied that Odysseus was braver as he faced many opponents at once, while the transfer of just the dead Achilles could not be considered an act of bravery. According to these sayings the Achaean decision was unanimous to present the arms to Odysseus.
This caused Ajax to lose his senses. This turn of events made him furious and angered and with the intervention of Athena he blurred and began killing sheep which he thought to be his Achaean comrades. He even grabbed a ram thinking that it was Odysseus dragged it inside his tent and the tortured it. The next morning when he came to his senses decided to commit suicide to avoid the disgrace and humiliation, so he fell on his own sword, thus putting an end to his life.