The high court asked the sessions court to reconsider its orders, granting bail to Lokesh Sharma and Devender Gupta.
The high court verdict has come as a relief to the National Investigation Agency (NIA), which opposed the bail on the ground that it could hamper the investigations.
The NIA had also argued that freeing the two accused on bail could also have an impact on the probe in the Malegaon, Ajmer and Samjhauta Express blasts as they are also suspected to be involved in all these terror attacks.
Nine people were killed and over 60 injured in the powerful bomb blast during Friday prayers on May 18, 2007, at the 17th century mosque here.
The high court on Dec 4, 2012, suspended the bail granted by the IVth Additional Metropolitan Sessions Court here on Nov 27.
Sharma and Gupta, former members of the Rashtriya Swayamsevak Sangh (RSS), are among six accused arrested by the NIA in the case.
Swamy Aseemanand, Bharat Mohanlal Rateshwar alias Bharat Bhai, Tejaram and Rajender Choudhary alias Samundar are the other accused in the judicial custody.
Two others, Sandeep V. Dange and Ramchandra Kalsangra, are untraceable and on the run. According to the investigators, another key accused, Sunil Joshi, was gunned down by his associates in December 2007 following some differences.