A car bomb targeting the Turkish military exploded Thursday in Istanbul, wounded eight people, officials said.

The explosion occurred inside a parked car near the entrance to a military garrison in Istanbul's Sancaktepe neighborhood as the evening rush hour began, the area's mayor, Ismail Erdem, said.

Five military personnel and three civilians were injured in the explosion, one seriously, said Istanbul governor Vasip Sahin.

The private Dogan news agency showed video of the wrecked car, which was still on fire. The windows of nearby buildings were blown out by the force of the blast.

The explosion comes just two days after Kurdish rebels detonated a car bomb close to a police vehicle in the mainly Kurdish city of Diyarbakir, killing three people and wounding dozens.

The rebels of the Kurdistan Workers' Party, or PKK, have been targeting police and military targets since July, when a fragile peace process collapsed.  The Islamic State group has also been blamed for a series of deadly bombings in Turkey.

The PKK is fighting for autonomy for Turkey's Kurds in the southeast of the country. It has waged a decades-long insurgency against the Turkish state in a conflict that has claimed 40,000 lives. The group is considered a terrorist organization by Turkey and its allies.

PKK-linked rebels have staged multiple bomb attacks against Turkish police and troops, which in turn have carried out tank-backed security operations in flashpoint areas.