Rahul Gandhi, the scion of India's most famous political dynasty, has taken over as president of the country's main opposition Congress party.

Taking the mantle from his mother, Sonia Gandhi, he faces an uphill battle to turn around the fortunes of the party which has been losing power to prime minister Narendra Modi's Hindu nationalist Bharatiya Janata Party (BJP) since 2014

The party has suffered humiliating defeats in recent state elections despite his active campaigning to win back support.

In a speech, Sonia Gandhi described her son as a new hope for the Congress as party workers danced, burst firecrackers and distributed Indian sweets to celebrate the generational shift in the leadership.

Mr Gandhi, 47, will be taking on Mr Modi when the prime minister seeks a second five-year term in 2019. Mr Modi has vowed to create a Congress-free India while working for the rise of Hindu nationalist forces.

In his speech, Mr Gandhi described himself as an "idealist" and said Indian people were getting disillusioned by policies pursued by the Modi government.

He said the Congress party, which had ruled India for decades, took the country into the 21st century through modernization and development. He accused Mr Modi of taking India "to a medieval path where people are butchered because who they are, beaten for what they believe in and killed for what they eat."

Shillong, India's homage to Bob Dylan Show all 12 1 /12 Shillong, India's homage to Bob Dylan Shillong, India's homage to Bob Dylan Shillong is known as India's rock music capital Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Lou Majaw in action Charukesi Ramadurai Shillong, India's homage to Bob Dylan Lou Majwaw in action Charukesi Ramadurai Shillong, India's homage to Bob Dylan Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai Shillong, India's homage to Bob Dylan Inside Dylan's Cafe Charukesi Ramadurai

"The Congress will take on this challenge and will never back down," he said.

Mr Gandhi was referring to killings and attacks on minority groups, especially Muslims, since the Bharatiya Janata Party swept national elections in 2014. Most of the violence against Muslims has involved fringe Hindu vigilante groups that have become active in small towns and cities across India. Muslims make up about 14 percent of India's 1.3 billion people and Hindus about 80 percent.

Gandhi is the sixth member of the Nehru-Gandhi family to lead Congress. His father, Rajiv Gandhi, grandmother Indira Gandhi and great-grandfather Jawaharlal Nehru have all served as prime minister since India's independence from British colonialists in 1947. Rahul Gandhi entered politics in 2004.

"Today, the Congress faces a possibly existential crisis even as Sonia Gandhi makes way for Rahul Gandhi to head the party," said Neerja Chowdhury, a political commentator.

Mr Gandhi was elevated as the party's vice president in January 2013, serving as his mother's number two. Sonia Gandhi, 71, stepped down as the party's longest-serving chief after leading the party for 19 years. She has been unwell in recent years and pushing her son to the fore.

Asked what role she would play after her son's elevation, she told the New Delhi Television channel, "My role is to retire."

However, Randeep Surejewala, a party spokesman, clarified that Sonia Gandhi retired as party president and not from politics.

"Her blessings, wisdom and innate commitment to Congress ideology shall always be our guiding light," he tweeted.

The Gandhi family and the Congress party have released little information about Sonia Gandhi's health problems. She had surgery in the United States for an undisclosed reason in 2011, and has returned to the U.S. for regular checkups since then.