Mention in Skanda Purana
Skanda Purana, one of 18 Hindu puranas, has references to this temple. After slaying Tarkasur, Kartikeya asked the Gods that how will be absolve himself of the sin of killing a devotee of Lord Shiv. Lord Vishnu consoled him-‘Killing a wicked person, who nourishes himself on the blood of innocent people, is not a sinful deed. But, still, if you feel guilty, the best way to atone for your sin is establish Shiva lingas and worship them with deep devotion.’
Kartikeya installed these Shivalingas at three different places with proper rituals in the presence of Maa Parvati and all other Gods. Stambeshwar is one of the three shrines where these Shiv lings were established.