Small arms fire could be heard for about an hour after the initial blast. An Associated Press reporter there saw fire trucks move to extinguish a blaze started by the blast.
Police officer Mohammad Aslan said the assault started at dusk when a car exploded near the gate of the compound, known as the Green Village.
The camp houses contractors from various countries, European diplomatic personnel and United Nations employees.
Green Village was last attacked by a suicide car bomber and armed attackers on May 2, 2012, and a number of Afghan guards were killed. None of its residents was injured.