Devotees queue to offer a prayers during the "Shivaratri" pilgrimage at the courtyard of the Pashupatinath Hindu temple in Katmandu, Nepal, February 27, 2014.

Around one million Hindus will flock to Kathmandu's Pashupatinath temple to observe the annual Maha Shivaratri, or "Great night of Shiva", to honour Lord Shiva, one of Hinduism's three main gods.

Hindu holy men, or sadhus, sit beside a fire at the Pashupatinath Temple, ahead of the Shivaratri festival, in Kathmandu, Nepal February 20, 2017. (Reuters)

The pilgrimage is made by Hindus, mainly from South Asia and the world, to cleanse their sins and pray to Lord Shiva, fast, meditate and earn a place in heaven. Maha Shivarathri will be observed on February 24 this year.

The ancient temple of Pashupatinath in Kathmandu is considered to be the most sacred temple devoted to Lord Shiva in Nepal. (AFP)

One legend says that when Lord Shiva's consort, Goddess Parvati died, he emerged from the forests near the temple, his body smeared with ash and smoking cannabis.

Hundreds of Hindu holy men, or Sadhus, sit - often naked - and puff on pipes filled with cannabis, their bodies smeared with ash. (AFP)

Cannabis grows wild in the forests of Nepal, but the usage and traffic of the narcotic is illegal in the country, and only permitted as a religious ritual for ascetics during the festival, in imitatation of Lord Shiva.

A Nepalese Sadhu (Hindu holy man) prepares marijuana as he gathers with others ahead of the forthcoming Hindu festival of Maha Shivaratri at The Pashupatinath Temple in Kathmandu on February 20, 2017. (AFP)

The Sadhus are allowed to smoke cannabis but not sell or distribute it among pilgrims.

Over the celebrations, the Sadhus also are given free food. Picture shows lunch being offered to Sadhus at the premises of Pashupatinath Temple, ahead of the Shivaratri festival in Kathmandu, Nepal February 15, 2017. (Reuters/Archive)

This year's festival include modern touches such as CCTV cameras to help protect crowds. Some of the holy men also play music on their mobile phones.

A devotee, dressed as Hindu deity Hanuman at the Pashupatinath Temple, ahead of the Shivaratri festival in Kathmandu, Nepal February 21, 2017. (Reuters)

For pilgrims, the rituals also involve pouring milk on a stone statue and making offerings of fruit, sandalwood paste and incense sticks.

Hindu devotees stand in a line to enter the Pashupatinath temple during "Shivaratri" festival in Kathmandu, Nepal, February 17, 2015. (AP/Archive)