Indian Deputy Prime Minister LK Advani will not be tried in relation to the 1992 destruction of a mosque at Ayodhya, a court ruled on Friday.
The BJP says the ruling on Mr Advani is a big victory
However, the court said seven other leading Hindus charged with inciting Hindu mobs to destroy the Babri mosque
should be tried.
They include the human resources minister, Murli Manohar Joshi, who has now offered his resignation.
Mr Advani said he was relieved to be exonerated but concerned that his colleagues had been implicated.
The BBC's Adam Mynott in Delhi says Mr Advani's Bharatiya Janata Party believes the ruling is a big victory in what it regards as a political matter.
Judge VK Singh issued his ruling in a special Central Bureau of Investigation court in the town of Rae Bareli in northern Uttar Pradesh state, which holds the Ayodhya site.
The judge gave no reasons for his decision on Mr Advani, who has always denied any wrongdoing despite being in Ayodhya at the time.
The seven remaining defendants face charges of inciting a Hindu mob, spreading hatred against Muslims, provoking the mob to demolish the mosque, rioting and spreading communal frenzy.
They will appear before the court on 10 October.
After the ruling, Mr Advani said: "The charge essentially is of making inciting speeches and thereby provoking the demolition. To the best of my knowledge no speeches were made that day."
The destruction of the Babri mosque sparked nationwide riots
Although relieved to be cleared, he said: "I am unable to understand how the distinction was made between me and my colleagues."
Mr Joshi told reporters: "I have sent my resignation to the prime minister [Atal Behari Vajpayee]." Mr Vajpayee is out of the country until 27 September.
BJP president M. Venkaiah Naidu said the charges amounted to
"There is no need for any minister, including Dr Joshi, to resign from the government," he said.
Another of those charged, Acharya Giriraj Kishore, vice-president of the hardline Hindu Vishwa Hindu Parishad, appeared unrepentant.
"We don't accept these charges as we believe that what we brought down was something which was imposed on India's soil 400 years ago."
A leader of the Babri Mosque Action Committee, Zafaryab Jilani, welcomed the charges, but said: "The discharged person should also be punished. People who instigated the volunteers should not be allowed to go scot-free."
THE SEVEN DEFENDANTS
Murli Manohar Joshi, human resources minister
Uma Bharati, former sports minister
Vinay Katiyar, BJP president in Uttar Pradesh
Vishnu Hari Dalmiya, Vishwa Hindu Parishad president
Ashok Singhal, VHP working president
Giriraj Kishore, VHP vice-president
Sadhvi Rithambara, VHP activist
AB Bardhan, leader of the Communist Party of India, went further, telling the BBC: "The court verdict is beyond comprehension. Advani was the leader of the whole movement. How can he be discharged?"
Hindus claim the Babri mosque was built on an ancient Hindu temple to Lord Ram at the site.
The destruction of the mosque sparked nationwide riots in which over 2,000 people were killed.
Muslims and Hindus have fought a bitter campaign over ownership of the site.
Both sides want to rebuild places of worship there.
This year, a court ordered an archaeological report into the site to investigate the Hindus' claim of an earlier temple.
Last month's report said there was evidence of the earlier building but the findings were heavily contested, with legal experts saying the report might not determine legal ownership.
The Bharatiya Janata Party came to power in 1998 partly because of its tough stance on Ayodhya.