Andhak - Andhakasura
In the Shiva Purana, when Shiva was meditating on Mandara mountain, Parvati who was in a playful mood covered Shiva's eyes due to which the whole universe was covered in darkness. The sweat that oozed out of Parvati's hands due to touching Shiva fell to the ground and created a horrible looking and blind boy. Parvati was terrified on seeing him however Shiva said that since he was born due to their physical contact he was their child. When the demon king Hiranyaksha who was childless performed penance to please Shiva in order to beget a child Shiva gifted the child to him and named him Andhaka due to his blindness. After Hiranyaksha's death Andhaka became the king however he was not regarded as an Asura since he was a divine product. Disowned by majority of his clan he performed a severe penance to please Brahma. Brahma thus appeared to him and offered him a boon. Andhaka demanded Brahma to make him invincible and to repair his vision. Brahma granted these wishes however warned him that he can be killed by Shiva. Andhaka went back to his kingdom and subdued all his opponents and even the Devas.
One day he asked his minister whether there was anyone who could match his strength, majesty and riches. The minister informed him that he did not have the company of a beautiful woman. He informed him that the world's most beautiful woman belonged to a matted ascetic who lived on Kailash and if he wished to be truly matchless he should possess her. He sent a messenger and told Shiva to hand his wife to him. Andhaka thus attacked Shiva with his greatest warriors however they were defeated by Shiva's army. One day when Shiva and his ganas were away Andhaka found Parvati alone. She fought with Andhaka but when she found him to be too overwhelming requested the gods to aid her. The battle went on for many years and when Shiva found out about this he declared a truce. Many attempts were made for a peaceful resolution however Andhaka insisted on acquiring Parvati. He renewed the assault. His trusted general Bali single handedly defeated all the gods and swallowed them . Shiva fired such powerful weapons at Bali which forced him to disgorge all the gods. Shiva in revenge swallowed Shukra, the preceptor of Asuras. Andhak then started attacking Indra. Shiva intervened to save Indra and began to attack the demon with his trident. However whenever his blood fell on the ground a copy of him was created. Then Lord Vishnu created Matrikas who licked the blood of the demon everytime he was hurt and prevented another copy of him was created. Shiva thus finally killed him by hacking his head off. However, since he had chanted Shiva's name before dying he was made a gana-chief by Shiva.
In another version of the Purana, his birth story and being disowned by his clan remains same. His kingdom was taken over by his cousins including Prahlada when he went to the forest to perform a penance to Brahma. During his penance he didn't take water or food and also started chopping off his limbs to please Brahma in desperation. Pleased, Brahma appeared before him and offered him a boon of his choice. Andhaka then asked Brahma to repair his vision and also asked him to make him invincible. Brahma however told him that he could not make him immortal since all that take birth must die however he could choose the condition of his death. Andhaka then asked him that he could be killed only if he lusts after a woman who is like a mother unto him. Brahma agreed and granted all his boons. When he returned to his kingdom his cousins out of fear not only handed his kingdom back but also theirs to his empire. After becoming the lord of all Asuras, Andhaka fought with the Devas along with his army and conquered heaven. He then proceeded to conquer the Nagas, Gandharvas, Rakshasas, Yakshas and the humans. He thus became the lord of all the three worlds. He was a cruel ruler and disrespected the Vedas, the Brahmins and the Devas. Once while travelling, Andhaka happened to visit the mountain Mandara. Charmed by the beauty of the mountain he decided to stay there and ordered his three generals Duryodhana, Vighasa and Hasti to search a place suitable to stay. While searching his generals found a cave in which a hermit was meditating and also saw a very beautiful woman along with him. They told their master about this who ordered them to bring the woman to him. When they told the ascetic to hand over the woman to their master Shiva refused saying if their master wanted her he should himself come and take him. When his generals informed him about this matter, Andhaka became furious and went to fight with the hermit. Andhaka along with his army fought Nandi and the ganas of Shiva. He and his army were however defeated and were forced to flee. Andhaka however soon returned to fight again which lasted or five hundred years. Vishnu, Brahma and the Devas too joined the battle against Andhaka and his army. Andhaka's general Vighasa and swallowed all the gods.Hearing of this, Shiva riding upon his bull attacked him and killed the demon. Shukracharya the preceptor of demosn kept bringing back the dead Asuras back to life by using his medicinal art of Mrit-Sanjivan. Shiva then ordered his ganas to catch hold of Shukrachurya. When they brought him to Shiva, he swallowed the demon-guru. Shiva then attacked Andhaka with his trident, however whenever a drop of his blood fell to the ground another demon like him was created. Shiva then ordered the goddess Chandi to drink the blood while he killed the demons created by Andhaka's blood. After killing them Shiva impaled Andhka with his trident and lifted him upon his trident where he remained upon for a very long time. Ultimately, realising his mistake Andhaka apologised to Shiva and started eulogising him. Pleased Shiva forgave him and made him the lord of all ganas