Four men have gone on trial in Denmark on charges of making bombs for a planned terrorist attack.

The four were arrested a year ago in central Denmark. They are accused of buying chemicals and lab equipment to produce explosives.

Tuesday, authorities in Denmark said they prevented a terrorist attack with the arrest of eight people around the capital, Copenhagen.

A Danish intelligence service official told reporters the suspects are linked to a senior al-Qaida figure and are suspected of planning a bomb attack.

The director of the Danish intelligence service Jakob Scharf says the suspects range in age from 19 to 29, and are from Afghanistan, Pakistan, Somalia and Turkey. He says six of them hold Danish citizenship.

A judge has ordered two of the suspects held in custody for 27 days while authorities continue their investigation.

It is not clear when the six others will be arraigned.

In April, a Danish court sentenced a Moroccan-born Danish man to three and a half years in prison for promoting terrorism.

He was the first person convicted under anti-terrorism legislation that Denmark passed after the September 11, 2001 terrorist attacks in the United States.

Some information for this report was provided by AFP and AP.