A special court in Rajasthan found Devendra Gupta and Bhavesh Patel guilty, the first time in living memory that Hindu radicals have been convicted for such a crime.
A third man 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.
Pakistan protests acquittal of Ajmer Sharif blast mastermind
Magistrate Dinesh Kumar Gupta pronounced 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," Sharma said.
Gupta and Patel's lawyer JS Rana told journalists they would appeal the verdict in a higher court.
Earlier this month, Pakistan lodged a formal protest with India over the acquittal of mastermind of the blast, Swami Aseemanand.
He was also behind the February 2007 Samjhauta Express terrorist attack. The deadly train bombing left 42 Pakistani citizens dead.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ