German police on Thursday arrested two Algerian men with possible links to the "Islamic State" militant group during raids in the capital Berlin, Hanover and Attendorn in the North Rhine-Westphalia state.

Police are searching for two other men after being tipped off by Germany's domestic intelligence agency.

The main suspect, a 35-year-old Algerian man, attended a training camp in Syria and was found in possession of material linking him to the "Islamic State," according to Berlin police. He is also wanted by Algerian officials for links to the terrorist organization.

The group of men is suspected of planning a "serious act threatening the security of the state," police said in a statement.

The two men who were arrested were living in refugee shelters, Berlin police spokesman Stefan Redlich told news channel N24.

"The refugee shelters where the suspects lived were searched," Redlich noted.

Authorities also confiscated mobile phones, computers and recordings. The group was expected to meet in Berlin to hash out plans for a terrorist attack on German soil, although police confirmed they did not know if they were close to fulfilling their ambitions.

"There were possible attack plans for Germany - concrete ones for Berlin," the Berlin prosecutor's spokesperson Martin Steltner told DPA news agency.

Watch video 01:26 German police arrests terror suspects plotting attack in Berlin

Police boost security

The arrests come as "Weiberfastnacht" begin on Thursday; kick starting a five-day celebration of Germany's carnival in the region surrounding Cologne and running through to Ash Wednesday on February 10.

The "Islamic State"-claimed attacks in Paris in November and a spate of reported sexual assaults and thefts that were largely blamed on North African migrants during New Year's Eve celebrations in Cologne were the backdrop of a tense atmosphere ahead of the celebrations, prompting increased security measures.

"No form of violence has any place at the carnival," said Cologne police chief Jürgen Mathies after announcing bolstered security measures across the city.

"That's why we will take vigorous action against all those who overstep the line. That goes for drunk abusers, thieves or sexual offenders who cannot accept that a woman says 'no'," Mathies added.

Some 2,500 police officers are expected to be stationed across the city of Cologne, marking a significant increase to last year's security presence. The security budget for the celebrations reached a high of 360,000 euros ($399,000).

Celebrations set to continue

Revelers were seen early Thursday morning dressed in costumes to mark the occasion in the North Rhine-Westphalia city of Bonn.

The beginning of carnival officially began at 11:11 local time (1011 UTC). On Thursday, women can be seen cutting off men's ties in exchange for a kiss, a symbolic move representing the clipping of their masculinity.

DW's Dana Regev tweeted scenes from near Cologne's central station.

The peak of celebrations takes place on Rose Monday, typically marked with a parade of giant floats that often take humorous perspectives of the hottest news of the year.

One float in Cologne is expected to depict German Chancellor Angela Merkel's reaction to the influx of migrants and refugees - many fleeing war in Syria - into Europe.

ls/kms (AFP, dpa, AP)