India's Rahul Gandhi, whose grandmother and father were both assassinated when he was a child, has warned that he too could be slain, as he accused his election rivals of sparking "communal fire".

The 43-year-old, expected to lead the ruling Congress party into next year's polls, also told a rally on Wednesday of how he had been friends with the bodyguards who killed his grandmother Indira when she was premier.

"My grandmother and father were assassinated and tomorrow I also may get killed; but I just don't care," Rahul, who is vice-president of Congress, said in a strikingly personal speech in the northern state of Rajasthan.

The notoriously shy Gandhi has often appeared reluctant to follow in his forebears' footsteps but now seems to be opening up about his personal tragedy as an election tactic against the Hindu national opposition.

Indira Gandhi was shot dead by her Sikh bodyguards in 1984 in revenge for an army assault on the Golden Temple in Amritsar, while Rahul's father Rajiv was assassinated in 1991 by Tamil suicide bombers.

"What does the BJP do? They spark communal fire .... Then we have to go to the people to put the fire out," said Gandhi in excerpts shown on Indian television.

"It takes years to forget anger but it takes only minutes to ignite anger within someone."

Opinion polls show that Congress -- even with Rahul in charge -- is likely to lose power in the elections due by next May with the Bharatiya Janata Party (BJP) opening up a commanding lead.

The BJP's candidate for prime minister is Narendra Modi, the chief minister of Gujarat who was at the helm of the state when some 2,000 people -- mainly Muslims -- were killed in communal riots in 2002.

Investigations cleared Modi of any personal responsibility but one of his former ministers was jailed for life for instigating the killing of 97 Muslims in one of the most notorious episodes of the riots.

While he did not mention Modi by name, Gandhi did refer to the bloodshed in Gujarat and accused the BJP of spreading "divisive ideology for their narrow personal gains".

The BJP reacted furiously to Gandhi's speech with several senior figures accusing him of hypocrisy given the record of communal violence under Congress's near-decade rule.

A BJP party spokesman said Rajiv Gandhi had incited a deadly backlash against Sikhs following Indira's assassination when he said it was only natural to expect the earth to "shake a little" after "a mighty tree" falls.

"If political parties are responsible for riots, then what does Congress have to say about the 1984 riots in which all those killed belonged to a particular religion?" said Sudhanshu Trivedi.

Parsa Venkateshwar Rao, a commentator for the Mumbai-based DNA newspaper, said Gandhi's comments were intended to evoke the "martyr" status of India's ruling family.

"It's a trumpeting of his legacy, it's him saying: 'I belong to a political family with martyr status'," Rao told AFP.

"People do remember what happened to his grandmother and father.

"Whether it pays electoral dividends remains to be seen."

Speaking of the day his grandmother was killed, Gandhi recalled arriving home after school and seeing the "blood of my grandma in one room and the blood of my 'friends' in another" -- a reference to bodyguards Beant Singh, who was subsequently shot, and Satwant Singh, who was later hanged.

"I was very close to them and one of them had taught me how to play badminton," he said.

"It took a long time, about 10-15 years, to free myself from that anger."

Rajiv Gandhi became prime minister immediately after Indira's assassination, only to lose power in 1989.

The Gandhi family has dominated politics in post-independence India. Indira's father Jawaharlal Nehru was the country's first prime minister, holding power from 1947 to 1964.