Justice Rajesh Dayal Khare ordered that Rai "be released on bail on his furnishing a personal bond and two local sureties each of the like amount to the satisfaction of the court concerned".
The judgement comes on the heels of a March 29 order by a two-judge bench setting aside the National Security Act (NSA) that was slapped against Rai, who represents the Pindra seat in the Uttar Pradesh Assembly.
"In case of default of any of the conditions enumerated above, the order granting bail shall automatically be cancelled," it said.
This was the second bail application by Rai after his previous prayer was rejected by a court order dated November 23, 2015.
Also Read
In his fresh bail plea, the MLA contended that two other persons named as co-accused in the case registered at Dashashwamedh police station in Varanasi were granted bail last week.
The lathi-charge had taken place on the intervening night of September 22-23 when one Swami Avimukteshwarananda along with hundreds of his supporters had tried to immerse an idol of Lord Ganesha in the Ganges notwithstanding recent restrictions on the practice in view of pollution in the river.
Rai had shot to fame when he was fielded by Congress in the 2014 Lok Sabha polls as its contender against Narendra Modi for the Varanasi seat.