A 22-year-old Syrian man who was the subject of a nationwide hunt and is believed to have been preparing a bomb attack was detained Monday, German police said.

Jaber Albakr was detained overnight in Leipzig, police in the eastern state of Saxony tweeted. Albakr, from the Damascus area of Syria, escaped the authorities Saturday during a raid of his apartment in Chemnitz. Investigators said they found “several hundred grams” of volatile explosive hidden in the apartment – enough to cause some significant damage.

Saxony criminal police chief Joerg Michaelis told reporters on Monday that Albakr was suspected of having ISIS contacts and had been on the radar of the country's domestic intelligence agency since last month with "hints" he may have been planning something.

Michaelis said "the behavior and actions of the suspect currently speak for an [ISIS] context."

The weekend raid came after Saxony police were tipped off about Albakr possibly planning an attack. He had been on Germany’s domestic intelligence service’s radar, but it wasn’t clear for how long.

Saturday morning, Albakr was seen leaving his apartment just as police prepared to raid the apartment building. Police fired a warning shot but were unable to stop him from scurrying away.

Experts are trying to determine whether the explosives they found in the apartment were the same ones used in the deadly Nov. 13 attacks in Paris and the March 22 attacks in Brussels. The explosives used in those attacks are known as TATP, or triacetone triperoxide.  

TATP has been used in many attacks over the years, and is favored by violent extremists because it's fairly easy to make and detonate. 

The explosives were destroyed Saturday in a controlled detonation by bomb squad experts in a pit dug outside the five-story apartment building because they were considered too dangerous to transport.

Germany has been on edge since two attacks this summer claimed by the Islamic State group in which multiple people were injured and both assailants died. Two other attacks unrelated to Islamic extremism, including a deadly mall shooting in Munich, have also contributed to fears. 

During the manhunt, federal police had increased security around the country, particularly around "critical infrastructure" like train stations and airports.

The authorities said that Albakr had come to Germany in the flood of 890,000 migrants who entered the country in 2015 and had been granted asylum.

The Associated Press contributed to this report.