Wednesday's verdict acquitted 32 of the 49 people charged - 17 had died while the case was under way.
The court said there was insufficient evidence to prove the demolition had been planned. Hindu mobs had demolished the mosque, saying it was built on the ruins of a temple for Lord Ram - they believe the deity was born in Ayodhya. It is both a historic and contentious verdict, ending a case that also implicated former Prime Minister Atal Behari Vajpayee, who died in 2018.