Every year in July and August, the people of Sri Lanka celebrate the dramatic festival of Kataragama.

Ever since the Liberation Tigers of Tamil Eelam ambushed an army patrol on 23 July 1983 and triggered the worst ethnic riots in the country's history, many travellers have viewed Sri Lanka as less "Pearl of the Orient" and more "Discarded oyster shell of the Indian Ocean". Since then, an estimated 64,000 lives have been lost in the fighting between the government and Tamil rebels, who occupy parts of the north and east of the island. Yesterday there were strikes and protests across the island. But despite the continuing conflict the tourist trade is slowly recovering, and nearly half-a-million sun seekers and culture buffs are taking Sri Lanka for what it is – a shining example of cultural, scenic and religious diversity.

From 21 July to 5 August, and coinciding with Esala poya (full moon) the Kataragama Festival takes place in the south east of the island. If anything can sum up the true nature of Sri Lanka, it is this festival.

Close to the Yala National Park, the town of Kataragama is an important pilgrimage site, especially for the minority Hindu population. Tradition states it is the domicile of the god Kataragama, also known as Skanda, god of War and son of the supreme god Shiva. The majority Buddhist population seek the Kiri Vihara here, an enormous chalk-white dagoba (Sinhalese for pagoda) said to contain the Buddha's sacred hair and King Mahasena's golden sword. Muslims, meanwhile, revere the mosque and shrine which they believe to be connected with al-Khizr, the mysterious servant of Allah, teacher of Moses and the discoverer of the Fountain of Life.

For me, Kataragama was more about atmosphere. One evening I traversed a narrow pedestrian bridge crossing the Menik Ganga river. Scores of people bathed in its depleted waters, an act meant to cleanse their body and minds. Down on its parched brown banks, crowds were dancing to the sound of drums, reed flutes and saxophones. I noticed some of the dancers had skewered their cheeks with a miniature spear. Most carried the red-arched framework of wood, known as the kavadi and which is held above the head as a form of penance.

On the other side of the river, people were already queuing four-deep for the perahera, which loosely means a parade or procession. Coloured lights illuminated the trees and added a greenish tinge to the festive atmosphere. Seventeen shrines covered this area, including the three principal places of worship for the pilgrims who come to Kataragama. Closest to where I stood was the gates of the Kataragama mosque (Khizr Thakkiya). Out of sight and at the northern end of the walkway, was the Kataragama Maha Devale, the residence of Kataragama. Another 400 metres beyond that, along a concrete walkway lined with blossoming fragrant frangipani trees, was the Kiri Vihara.

As darkness fell, I squeezed into the crowd, sitting on the sand close to the white walls of the Valli Amma Kovil, a temple belonging to the lover of Kataragama (his wife, Lady Devasena, resided at the opposite end of the walkway in the Teyvani Amma Kovil, a temple built at right angles to the Maha Devale and said to be symbolic of her displeasure). It wasn't long before six boys appeared cracking and spinning whips with happy abandon. From a distance I heard the rhythmic beating of drums and blowing of reed flutes. Three more boys followed, twirling fire hoops, while slowly the music got louder and louder until, finally, I sat in awe as the procession passed before me.

Men stopped at regular intervals, holding poles of burning copra (coconut); elephants, their back legs chained and covered in colourful cloth full of pattern and finery, marched slowly along while being led by their mahout.

Low-country dancers adorned with head-dresses, beads, breastplates and anklets, leapt and danced with startling displays of movement and co-ordination; groups of drummers played different rhythms, some moving with soft languid steps and others in fast, controlled bursts; groups of brightly garbed children were directed by their teacher, displaying dances with various degrees of skill and wonder. Meanwhile a group of women showed the religious symbolism of the festival by carrying burning pots of holy ash on their heads.

For half an hour, I was entertained by this display of colour, music and dance. Finally, covered in a red and gold cloth and carrying a yellow garlanded seat, a tusker elephant bringing Kataragama to his lover, Valli Amma, stopped by the entrance to the temple. Riding high on the elephant sat the white-robed chief controller of the temple premises, the Basnayake Nilame, who covered the casket in a green blanket and accompanied him down some steps, along a red carpet and into the Valli Amma Kovil.

Bells were rung and drums beat for the next five minutes until they reappeared, preceded by two priests who bowed and sprinkled holy water. After accompanying the green-blanketed god back onto the elephant, it was led back to the Maha Devale.

By this time, people were getting to their feet and following the elephant. I did too and noticed four men carrying burning pots of holy ash, their palms protected only by betel leaves. Another man was led by strings attached to needles inserted into his back while his tongue was pierced by a sharp blade. Some just carried their pujas (ritual honour of the gods), to be offered inside the Maha Devale.

Others, like me, just walked peacefully and thoughtfully, having enjoyed the spectacle.