History and Legends Associated with Kedarnath
Kedarnath temple, which was firstly constructed by Pandavas and later on by Adi Shankaracharya is dedicated to lord Kedareshwar, which is one among the 12 revered Jyotirlingams of Lord Shiva. The temple enshrines Jyotirlingam of Lord Kedar who is incarnation of Lord Shiva seated here in the form of Jyotirlingam. The Jyotirlingam here is a self-manifested lingam of Lord Shiva and is the highest among all other twelve Jyotirlingams.
The history associated with Kedarnath temple, which dates back to thousands of years back is that, when Pandavas after winning the war against Kauravas in Mahabharat in Kurukshetra realised that they have ultimately killed their own kind and relatives, started repenting and realised that they have done sins. That is when they sought the blessing of Lord Shiva for liberation.
And, for seeking the blessing of Lord Shiva, they initially went to Kashi but they came to know that the Lord now resides in the snow wrapped Himalayas. After which they travelled the Himalayas and entered the region through Haridwar. But Lord Shiva being Lord Shiva wanted to test the determination of Pandavas and hence did not weanted them to give an easy darshan for ablution of their sins and thus he hid himself from Pandavas disguised as a buffalo. The location where the god Shiva concealed himself, came to be known as Guptakashi.
Not finding the god, they proceeded for Gauri Kund where two of the Pandava brothers; Nakula and Sahedeva came across a unique looking buffalo. The third brother Bheema started pursuing the unique buffalo. The buffalo had hidden its face into the earth and Bheema grabbed it by its tail and then here was the fierce battle between the buffalo and the Pandava brother Bheema. In the end Bheema disintegrated the buffalo into pieces which fell at different places. The hump fell at Kedarnath, the arm fell at Tungnath, the face fell at Rudranath, the hair fell at Kalpeshwar and the naval fell at Madhyamaheshwar.
After the body got disintegrated, Lord Shiva appeared and then the Pandavas seeked the blessings of the god and their sins were then absolved and after this the god settled and started residing at that place which later became famous as Kedarnath. And, the four places, Tunganath, Rudranath, Kalpeshwar, Madhyamaheshwar along with Kedarnath became famous as Panch Kedars.
There is a different mythological story associated with Kedarnath, which says that the two incarnations of Lord Vishnu, Nar and Narayan had done rigorous and extensive penance in front of handmade cylindrical soil mound, the Jyotirlingam and seeing their dedication god Shiva appeared before them and blessed them and asked them to seek the blessing in form of a desire. Their desire was that lord Shiva should permanently reside in Kedarnath in the form of Jyotirlingam, to which the god Shiva agreed and enshrined himself in form of lingam at Kedarnath. And, since ages thousands and thousands of people across India and neighbouring countries flock to visit this famous shrine of Kedarnath and get their sins absolved.