Four men have been jailed in pre-trial detention for four weeks, suspected of having claimed allegiance to the Islamic State group under Denmark's terror laws.

The men in their 20s cannot be named under a court ban. Details remain undisclosed because Friday's hearing was held behind closed doors barring publication of details.

All pleaded not guilty. If convicted, they face up to six years in jail.

Danish media say at least three of the men have relations to criminal gangs but their cases otherwise seem unrelated although all have been in Syria at least once.

The four were arrested Thursday in coordinated police raids in the Danish capital and suburbs.