Shri Trivati Nath Temple is one of the six old sanctuaries devoted to Lord Shiva. It is situated on the edges of the city of Bareilly. Master Shiva is likewise called Trivati Nath. As indicated by legends, Lord Shiva or Trivati Nath forecasted that he would show up in the fantasy of a shepherd under the three banyan trees situated in the thick woodland in the panchal territory.
Consistent with the prediction, the shepherd who was lying snoozing under the banyan trees saw a shiv ling in his fantasy. When he woke up he found a shivling lying close to the underlying foundations of the trees. This episode occurred in Vikrami Samvat 1474 according to the Hindu logbook. This time corresponds with the Prakatya Diwas or the day of rise of Baba Trivati Nath Bhagwan as a linga.