Two suicide bombings hit the Syrian capital of Damascus on Wednesday, killing dozens as the country's war entered its seventh year.

A suicide bomber detonated his explosive vest in the capital's main judicial building early in the afternoon, killing at least 31 people and wounding 102 others, Syria's state news agency SANA reported. 

A second attacker detonated himself at a restaurant in the Rabweh area of Damascus, according to SANA, wounding at least 28 people.

Syria's war: 'Our children are living in fear'

Al Jazeera's Natasha Ghoneim, reporting from the Turkish city of Gaziantep along the Syrian border, said the suicide bomber in the first blast reportedly detonated himself after he was stopped by security at the gate of the court.

"The attack happened during a peak time to inflict the maximum number of casualties," she said.

There was no immediate claim for the bombing, which came as the country's civil war entered its seventh year.

The attack on capital's Palace of Justice, located near the famous and crowded Hamidiyeh market in Damascus, was the latest in a spate of explosions and suicide attacks targeting government-controlled areas in Syria and its capital.

Attackers have also twice struck the government-held city of Homs in the past few weeks

Analysts who follow Syria have predicted that as rebels fighting to oust President Bashar al-Assad suffer military setbacks, they will increasingly turn to guerrilla attacks in territory controlled by the government.

Damascus police chief Mohammad Kheir Ismail told state TV that a man wearing a military uniform and carrying a shotgun and grenades arrived to entrance of the palace in the early afternoon.

The guards stopped the man, took away his arms and asked to search him. At that point, the man hurled himself inside the building and detonated his explosives, the chief said.

READ MORE - Syria war: 'Worst man-made disaster since World War II'

Ahmad al-Sayed, Syria's attorney general, confirmed that account to state TV, saying when the security guards tried to arrest the man, he threw himself inside the palace and blew himself up.

"This is a dirty action as people who enter the palace are innocent," he said, noting that the timing of the explosion was planned to kill the largest number of lawyers, judges and other people who were there at the time.

Ambulances rushed to the scene to transfer casualties to hospital.

The blast followed twin attacks on Saturday targeting Shia holy sites in the capital's Old City that killed at least 40 people in Damascus, an attack claimed by a hardline coaltion known as Tahrir al-Sham, which includes groups with links to al-Qaeda.

But in a statement put out shortly after the bombings, Tahrir al-Sham denied involvement in Wednesday's attacks, and emphasised that its "objectives are limited to security branches and military barracks of the criminal regime and its allies".

Esewhere in Syria, air raids in the rebel-held city of Idlib killed at least 21 civilians, according to the UK-based Syrian Observatory for Human Rights.

The Syrian Civil Defence, a rescue group also known as the White Helmets that operates in opposition territory, put the death toll from the pre-dawn bombing at 22, and said that 15 children were among the dead. 

Source: Al Jazeera and news agencies