The camp of Pandavas was protected by a very dreadful form of Lord Shiva which Ashwattahama witnessed while he was entering the camp as described in this chapter of Saupitaka Parva:
Sanjaya said, "Inviting Kritavarma, as also the mighty car-warrior Kripa, Drona's son, filled with rage, approached the gate of the camp. He there beheld a being of gigantic frame, capable of making the very hair stand on end, and possessed of the effulgence of the Sun or the Moon, guarding the entrance. Round his loins was a tiger-skin dripping with blood, and he had a black deer for his upper garment. He had for his sacred thread a large snake. His arms were long and massive and held many kinds of uplifted weapons. He had for his angadas a large snake wound round his upper arm. His mouth seemed to blaze with flames of fire. His teeth made his face terrible to behold.
His all weapons were devoured by him when he tried to attack him, then he thinks that dreadful being was the fruit of his sinful actions, so he seeks the protection pf Lord Mahadeva there:
सोऽहमद्य महादेवं प्रपद्ये शरणं विभुम्।
दैवदण्डमिमं घोरं स हि मे नाशयिष्यति।।
कपर्दिनं प्रपद्येऽहं देवदेवमुमापतिम्।
कपालमालिनं रुद्रं भगनेत्रहरं हरम्।।
स हि देवोऽत्यगाद्देवांस्तपसा विक्रमेण च।
तस्माच्छरणमभ्येष्ये गिरिशं शूलपाणिनम्।।
I shall, therefore, at this hour, seek the protection of the puissant Mahadeva! He will dispel this dreadful rod of divine chastisement uplifted before me. I will take the shelter of that god, that source of everything beneficial, the lord of Uma, otherwise called Kapardin, decked with a garland of human skulls, that plucker of Bhaga's eyes called also Rudra and Hara. In ascetic austerities and prowess, he far surpasses all the gods. I shall, therefore, seek the protection of Girisha armed with the trident.
Then he prays to Lord Maheswara with an excellent Stuti also known as 'Draunina ShivaStuti", which goes as:
उग्रं स्थाणुं शिवं रुद्रं शर्वमीशानमीश्वरम्।
गिरिशं वरदं देवं भवभावनमव्ययम्।।
शितिकण्ठमजं रुद्रं दक्षक्रतुहरं हरम्।
विश्वरूपं विरूपाक्षं बहुरूपमुमापतिम्।।
श्मशानवासिनं दृप्तं महागणपतिं विभुम्।
खट्वाङ्गधारिणं मुण्डं जटिलं ब्रह्मचारिणम्।।
मनसा ह्यनुचिन्त्यैनं दुष्करेणाल्पचेतसा।
अद्य भूतोपहारेण यक्ष्ये त्रिपुराघातिनम्।।
स्तुतं स्तुत्यं स्तूयमानममोघं कृत्तिवाससम्।
विलोहितं नीलकण्ठमसह्यं दुर्निवारणम्।।
शुक्रं विश्वसृजं ब्रह्म ब्रह्मचारिणमेव च।
व्रतवन्तं तपोनिष्ठमनन्तं तपतां गतिम्।।
बहुरूपं गणाध्यक्षं त्र्यक्षं पारिषदप्रियम्।
धनाध्यक्षप्रियसखं गौरीहृदयवल्लभम्।।
कुमारपितरं पिङ्गं गोवृषोत्तमवाहनम्।
कुत्तिवाससमत्युग्रमातोषणतत्परम्।।
परं परेभ्यः परमं परं यस्मान्न विद्यते।
इष्वस्त्रोत्तमभर्तारं दिगन्तं देशरक्षिणम्।।
हिरण्यकवचं देवं चन्द्रमौलिविभूषणम्।
प्रपद्ये शरणं देवं परमेण समाधिना।।
इमां चेदापदं घोरां तराम्यद्य सुदुस्तराम्।
सर्वभूतोपहारेण यक्ष्येऽहं शुचिना शुचिम्।।
"I seek the protection of Him called Ugra, Sthanu, Shiva, Rudra, Sharva, Ishana, Ishvara, Girisha; and of that boon-giving god who is the Creator and Lord of the universe; of Him whose throat is blue, who is without birth, who is called Shakra, who destroyed the sacrifice of Daksha, and who is called Hara; of Him whose form is the universe, who hath three eyes, who is possessed of multifarious forms, and who is the lord of Uma; of Him who resides in crematoriums, who swells with energy, who is the lord of diverse tribes of ghostly beings, and who is the possessor of undecaying prosperity and power; of Him who wields the skull-topped club, who is called Rudra, who bears matted locks on his head, and who is a brahmacari. Purifying my soul that is so difficult to purify, and possessed as I am of small energy, I adore the Destroyer of the triple city, and offer myself as the victim. Hymned thou hast been, deserving art thou of hymns, and I hymn to thy glory! Thy purposes are never baffled. Thou art robed in skins; thou hast red hair on thy head; thou art blue-throated; thou art unbearable; thou art irresistible! Thou art pure; thou art the Creator of Brahman; thou art Brahma; thou art a brahmacari; thou art an observer of vows; thou art devoted to ascetic austerities; thou art infinite; thou art the refuge of all ascetics; thou art multiform; thou art the leader of diverse tribes of ghostly beings; thou art three-eyed; thou art fond of those beings called companions; thou art always seen by the Lord of treasures; thou art dear to Gauri's heart; thou art the sire of Kumara; thou art tawny; thou hast for thy excellent bearer a bovine bull; thou art robed in a subtle attire; thou art most fierce; thou art eager to adorn Uma; thou art higher than all that is high; thou art higher than everything; there is nothing higher than thou; thou art the wielder of weapons; thou art immeasurable, and thou art the protector of all quarters; thou art cased in golden armour; thou art divine; thou hast the moon as an ornament on thy brow! With concentrated attention, I seek thy protection, O god! For success in getting over this dreadful distress that is so difficult to get over, I sacrifice unto thee, the purest of the pure, offering for thy acceptance the (five) elements of which my body is composed!"
Then after this prayer thousands of Rudra Ganas appear before Ashwathama as described in this chapter of Saupitaka Parva. Then Ashwathama performed a special type of Yajna there as:
जनयेयुर्भयं ये स्म त्रैलोक्यस्यापि दर्शनात्।
न च तान्प्रेक्षमाणोऽपि व्यथामुपजगाम ह।।
अथ द्रौणिर्धनुष्पाणिर्बद्धगोधाङ्गुलित्रवान्।
स्वयमेवात्मनात्मानमुपहारमुपाहरत्।।
धनूंषि समिधस्तत्र पवित्राणि सिताः शराः।
हविरात्मवतश्चात्मा तस्मिन्भारत कर्मणि।।
ततः सौम्येन मन्त्रेण द्रोणपुत्रः प्रतापवान्।
उपहारं महामन्युरथात्मानमुपाहरत्।।
तं रुद्रं रौद्रकर्माणं रौद्रैः कर्मभिरच्युतम्।
अभिष्टुत्य महात्मानमित्युवाच कृताञ्जलिः।।
The mighty Ashvatthama, however, beholding them, felt no fear. Drona's son, armed with bow, and with fingers cased in fences made of iguana skins, himself offered up his own self as a victim unto Mahadeva. Bows were the fuel, and sharp shafts were the ladles, and his own soul possessed of great might was the libation, O Bharata, in that act of sacrifice. The valiant and wrathful son of Drona then, with propitiating mantras, offered up his own soul as the victim. Having with fierce rites adored Rudra of fierce deeds, Ashvatthama with joined hands, said these words unto that high-souled god.
Then he finally proceeds to offer his own self in that Yajna:
इममात्मानमद्याहं जातमाङ्गिरसे कुले।
स्वग्नौ जुहोमि भगवन्प्रतिगृह्णीष्व मां बलिम्।।
भवद्भक्त्या महादेव पस्मेण समाधिना।
अस्यामापदि विश्वात्मन्नुपाकुर्मी तवाग्रतः।।
त्वयि सर्वाणि भूतानि सर्वभूतेषु चासि वै।
गुणानां हि प्रधानानां कैवल्यं त्वयि तिष्ठति।।
सर्वभूताश्रय विभो हविर्भूतमवस्थितम्।
प्रतिगृहाण मां देव यद्यशक्याः परे मया।।
इत्युक्त्वा द्रौणिरास्थाय तां देवीं दीप्तपावकाम्।
"Sprung from Angirasa's line, I am about to pour my soul, O god, as a libation on this fire! Accept, O lord, this victim! In this hour of distress, O Soul of the universe, I offer up my own self as the sacrificial victim, from devotion to thee and with heart concentrated in meditation! All creatures are in thee and thou art in all creatures! Assemblage of all high attributes occur in thee! O lord, O thou art the refuge of all creatures. I wait as a libation for thee, since I am unable to vanquish my foes.
Then after this prayer thousands of Rudra Ganas appear before Ashwathama as described in this chapter of Saupitaka Parva.
Then finally Lord Mahadeva appears before him and tells that although he was acting like a protector upto that time but now he shall act as destroyer because their time is out:
सन्त्यज्यात्मानमारुह्य कृष्णवर्त्मन्युपाविशत्।।
तमूर्ध्वबाहुं निश्चेष्टं दृष्ट्वा हविरुपस्थितम्।
अब्रवीद्भगवान्साक्षान्महादेवो हसन्निव।।
सत्यशौचार्जवत्यागैस्तपसा नियमेन च।
क्षान्त्या भक्त्या च धृत्या च कर्मणा मनसा गिरा।।
यथावदहमाराद्वः कृष्णेनाक्लिष्टकर्मणा।
तस्मादिष्टतमः कृष्णादन्यो मम न विद्यते।।
कुर्वता तात सम्मानं त्वां च जिज्ञासता मया।
पाञ्चालाः सर्वदा गुप्ता मायाश्च बहुशः कृताः।।
कृतस्तस्यैव सम्मानं पाञ्चालान्रक्षता मया।
अभिभूतास्तु कालेन नैषामद्यास्ति जीवितम्।।
एवमुक्त्वा महात्मानं भगवानात्मनस्तनुम्।
आविवेश ददौ चास्मै विमलं खङ्गमुत्तमम्।।
अथाविष्टो भगवता भूयो जज्वाल तेजसा।
वेगवांश्चाभवद्युद्धे देवसृष्टेन तेजसा।।
तं दृष्ट्वा तानि भूतानि रक्षांसि च समाद्रवन्।
अभितः शिबिरं यान्तं द्रोणपुत्रं महारथम्।
देवदेवं हरं स्थाउं यान्तं साक्षादिवेश्वरम्।।
Beholding him stand immovable and with uplifted hands and as an offering up to himself, the divine Mahadeva appeared in person and smilingly said, "With truth, purity, sincerity, resignation, ascetic austerities, vows, forgiveness, devotion, patience, thought, and word, I have been duly adored by Krishna of pure deeds. For this there is none dearer to me than Krishna. For honouring him and at his word I have protected the Pancalas and displayed diverse kinds of illusion. By protecting the Pancalas I have honoured him. They have, however, been afflicted by time. The period of their lives hath run out." Having said these words unto the high-souled Ashvatthama, the divine Mahadeva entered Ashvatthama's body after giving him an excellent and polished sword. Filled by that divine being, Drona's son blazed up with energy. In consequence of that energy derived from godhead, he became all-powerful in battle. Many invisible beings and rakshasas proceeded along his right and his left as he set out, like the lord Mahadeva himself, for entering the camp of his foes."
One can transliterate Devanagari content above from this site.