COPENHAGEN (AP) — Two Danish brothers originally from Somalia have been arrested on suspicion of plotting a terror attack, Denmark‘s security service said Tuesday.

The men, aged 18 and 23, were suspected of “being in the process of preparing an act of terror” after being overheard talking about methods, targets and different weapon types, the Danish Security and Intelligence Service said.

The agency, known by its Danish acronym PET, said the brothers were arrested late Monday — one in the western Danish city of Aarhus and the other as he arrived by plane at Copenhagen’s international airport.

The suspects are “Danish citizens of Somali origin” who have lived in Denmark for 16 years, the agency said.

One of the men had been at a training camp in Somalia run by the Islamist militant group al-Shabab, which has links to al Qaeda, PET said.

The men were charged with receiving training with the aim of committing an act of terror, in what the agency said are the first known terror-trained suspects in Denmark.

“According to PET’s assessment, the arrests have prevented a concrete act of terror and the arrests therefore don’t lead to a changed evaluation of the terror threat in Denmark,” the agency said, adding that the terror threat level in Denmark remains “serious.”

PET’s former operative chief, Hans Joergen Bonnichsen, said previous suspects had been “kitchen-table terrorists” with no experience or training.

The Scandinavian country has been in the cross hairs of Islamist terror groups after the publication of newspaper cartoons depicting the Prophet Muhammad in 2005.

“To me there is no doubt that the latest arrests are rooted in the Muhammad cartoons,” Mr. Bonnichsen said.

A Somali man living in Denmark was convicted of terrorism and sentenced to 10 years in prison after breaking into the home of Kurt Westergaard, one of the cartoonists, with an ax in 2010.

Last year, a Chechen-born man was sentenced to 12 years in prison for preparing a letter bomb that exploded as he was assembling it in a Copenhagen hotel in 2010.

Another trial is under way in Denmark against four men accused of plotting a shooting spree at another Danish newspaper.