Two French people, one Italian, their Algerian driver, and five gendarmes were injured but were "out of danger," the ministry said in a statement.
The attack was on a route between Lakhdaria and the village of Maala, about 100 kilometers (60 miles) east of the capital Algiers.
It was the latest in a string of attacks that have shaken Algeria and the government's effort to turn the page on an insurgency that wracked the country in the 1990s and continues to simmer.
Two attacks earlier this month targeting Algerian officialdom in the northeast of the country left dozens dead.
Al-Qaida in Islamic North Africa, the new name for a militant group long known as the GSPC, has claimed responsibility for both attacks.