The group said in a statement it had attacked the Tishrin power station, 50 km (30 miles) northeast of the capital. The Syrian military source acknowledged the group had staged assaults, but said all those who took part had been killed.
Syrian and allied forces backed by Russian air strikes have forced Islamic State militants out of the town of al-Qaryatain, which lies between Damascus and the ancient city of Palmyra, itself recaptured by the government last week.
Islamic State has also been losing ground to U.S.-allied Kurdish forces in northern Syria, and in recent days to Turkish-backed rebel groups fighting a separate battle against the group north of Aleppo.
The Syrian source said Tuesday night’s attacks outside Damascus appeared to be the jihadist group’s response to its reverses around Palmyra.
Islamic State attackers, using five bomb-laden cars, also struck military positions near the Dumeir military airport 40 km (25 miles) northeast of Damascus, killing 12 soldiers, the Syrian Observatory for Human Rights, a British-based organization that tracks the war, said.
Islamic State claimed the bombings in an online statement, saying it carried out a suicide attack on government forces which were moving north from the military airport.
Government forces responded with shelling and air strikes around the Dumeir area, which is held by a rebel group sympathetic to Islamic State, the Observatory said.
It added that the strikes killed at least nine civilians there and that around 15 Islamic State fighters, as well as the drivers of its five bomb-laden cars, died in the clashes.
The Syrian military source said 13 of the group’s fighters had been killed in clashes in the area around Dumeir.