Ashwathama was the son of Guru Dronacharya, who was the son of Bharadwaja, one of the Saptarishi or Seven Divine Sages of Hinduism and grandson of Devrishi Brihaspati, the Guru of the Devas.
The character of Ashwathama assumed great importance during the closing stages of the Great War of the Mahabharata and became the central personality as the war concluded.
Some sources say that Ashwathama’s birth was the result of a severe penance undertaken by Guru Dronacharya to please Shiva and gain his blessing in order to beget a most powerful and God-Like son. These sources also believe that Ashwathama is a manifestation of none other than Shiva and address him as Shivrupi Ashwathama.
As per these sources, after killing the sons of the Pandavas, Ashwathama used the Brahmastra against Arjuna. Arjuna was advised by Shri Krishna to respond with a Shaivastra, Arjuna directed the Shaivastra in the direction of the Brahmastra and was able to pacify the Brahmastra.
However as the Brahmastra was unstoppable it redirected in the direction of the Womb of Uttara, the daughter in law of Arjuna and destroyed the unborn fetus, which was miraculously brought to life by Shri Krishna.
After this, Shri Krishna along with the Pandavas bowed before the feet of [Charno Me Pranam] Ashwathama and started chanting Stuti [Prayer in the form of Praise] of the Shivrupi Ashwathama.
I am well aware that there are major fundamental differences in this article and that of most other versions relating to the events, which are described in this article.