Residents in India's capital New Delhi have set a world record for the largest number of people taking part in a single yoga session during International Yoga Day celebrations.

More than 35,000 people showed up for the event hosted by prime minister Narendra Modi, who last year convinced the United Nations to dedicate a day to the ancient practice.

Sorry, this video has expired New Delhi crowd sets world record for largest yoga session

"I feel very joyful," student and participant Sakshi told the ABC.

"It is very good for India ... and I am proud that India is the first country which invented yoga and this day, it is very big thing for us."

Tens of thousands of colourful yoga mats lined Delhi's ceremonial Rajpath boulevard on Sunday as participants from various faiths - Hindus, Christians and Muslims – gathered before sunrise.

The devotees had been practicing for weeks for the highly orchestrated event which was the brain child of Mr Modi, who was elected to office last year.

The 35-minute routine was specially devised by Mr Modi's personal yogi.

DVDs of the routine were sent out to Indian missions around the world weeks ago so they could prepare to hold their own events on Sunday.

Indian yoga enthusiasts perform yoga on International Yoga Day in Amritsar. ( AFP: Narinder Nanu )

Yoga day commemorates 'peace, harmony'

In December the UN unanimously approved Mr Modi's suggestion that day be set aside to mark the importance of the ancient Indian practice of yoga.

"I think that today — 21 June, the international day of yoga — is not just the beginning of an event, it is a day to commemorate peace, harmony, to train the human mind to scale heights, it's the start of a new era," Mr Modi told the crowd.

Before the event, the media had been specifically told that Mr Modi, a self-confessed yoga fanatic, would not be doing any poses himself.

But in a surprise move, he left the stage to take up a position on a mat among the crowd, creating chaos among the media desperate to get close to the highly popular, and often aloof, leader.

The day was about more than just health and wellbeing – it was a public relations exercise for India on a grand scale.

The country's foreign minister Sushma Swaraj said that the UN declaration of International Yoga Day, at the request of Mr Modi, showed the world that "in only 12 months, India has reached the height where India speaks and the whole world listens."

Ram Madhav, the national general secretary of Mr Modi's political party (the Bharatiya Janata Party), said yoga was India's greatest contribution to mankind.