A third diplomat, consul Boualem Sayes, had died in captivity "from a chronic illness", the ministry said.
It did not say whether Mourad Guessas and Kedour Miloudi had been released by their kidnappers or had been freed in a military operation.
The ministry did say however that Algeria had not paid a ransom to secure their freedom.
The two were released "after intense and tireless efforts" by authorities in "the utmost discretion", a statement said.
It also confirmed for the first time the execution, reported in September 2012, of vice-consul Tahar Touati, describing his death as an "odious assassination".
Algeria's consul in Gao, in northeastern Mali, and six of his staff were taken hostage by MUJAO on April 5, 2012 while the Islamist militants were in control of the city.
Three jihadist groups, Al-Qaeda in the Islamic Maghreb (AQIM), Ansar Dine and MUJAO, in 2012 took control of much of the desert north of Mali, including the three main towns of Kidal, Gao and Timbuktu.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
