The bomb appeared to target public works officials who were inspecting the construction site of new homes in Tlidjen, near the country's eastern border with Tunisia, the security official said. Those killed were three local public works officials and two entrepreneurs.
There was no immediate claim of responsibility. Most attacks in Algeria are claimed by al-Qaida in Islamic North Africa, a local Islamic insurgency movement that joined Osama bin Laden's terrorist network in 2006.
Authorities believe the bomber or bombers had prior knowledge of the planned inspection, the security official said. He and a hospital official who confirmed details of the attack spoke on condition of anonymity because they are not authorized to speak to media.
Algerian troops, police and other representatives of the state have often faced attacks from the country's Islamist militants. Earlier this month, suspected militants bombed a convoy of Algerian troops, killing five and injuring 10.
Algeria's conflict began in 1992 after the army canceled the second round of the country's first-ever multiparty elections, stepping in to prevent a likely victory by the fundamentalist Islamic Salvation Front, commonly known by its French acronym, FIS.
Islamist armed groups worked to force to overthrow the government, and up to 200,000 people were killed in the violence that ensued. Attacks continue today, though they are more sporadic.