Arguments over the quantum of punishment were completed on March 18 and the court on Wednesday gave life imprisonment to both the surviving convicts.
The police had initially blamed Pakistan-based terrorists for the 2007 attack on the revered 12th-century Sufi shrine at Ajmer in Rajasthan, which killed three people and injured 15.
But earlier this month a special court in Rajasthan found Devendra Gupta and Bhavesh Patel guilty. A third man Sunil Joshi who was shot dead in the months after the attack and tried posthumously was also convicted.
All three were convicted on charges related to explosives and conspiracy to commit unlawful acts over the blast, which came just before the Muslim festival of Eid.
Magistrate Dinesh Kumar Gupta pronounced the sentence on Wednesday.
Special public prosecutor Ashwini Sharma said their motive was to create communal disharmony.
"Their motive was to hurt religious sentiments of Muslims during the month of Ramzan (Ramadan) by the bomb blast," Mr Sharma said.
The court acquitted Swami Aseemanand on March 8, he was charged with being the ideologue and the financier of the group that planned and executed the blasts.
The court held Mr Patel responsible for planting the bombs at the Sufi shrine.
When asked why he was convicted and Swami Aseemanad acquitted he said, "Actually, we all are innocent, we don't disrespect the judgement but we will appeal in the high court."
The investigations into the Dargah blast also created a political furore as the NIA in its chargesheet said this was the work of Hindu extremists and claimed the blasts at Ajmer dargah, Hyderabad's Mecca masjid, Malegaon and Samjhauta Express were all linked, a charge denied by the lawyer for the accused.
(With inputs from agencies)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.