BERLIN — German authorities said Friday that they have arrested two men suspected of plotting a knife attack on worshippers at a synagogue in the southwestern city of Heidelberg.

The suspects, who are 24 and 18 years old, were detained during separate police operations in the state of Baden-Wuerttember earlier this month, German news agency dpa reported, citing state prosecutors and police.

The pair discussed “the killing of one or more visitors in the attack on the synagogue followed by death as martyrs, whereby the two persons wanted to be shot to death by police,” authorities said in a joint statement.

The pair could face charges including conspiracy to commit murder.

Police uncovered the plot when they searched the home of the older suspect on May 3. During the search, a police officer shot and injured the suspect after he had grabbed a knife.

Evidence seized during the search included an exchange of online messages between the two suspects in April where they discussed the possible attack on the synagogue, the authorities said.

Police detained the younger suspect and searched his apartment on May 18.

Both men are German citizens, with the 18-year-old also holding Turkish nationality, authorities said. Their names were not released.

German leaders have warned of the risks of attacks on Jews and decried a surge in anti-Semitism following the ongoing war between Israel and Hamas.

Loading video…

Trendy Bites: Thanksgiving ... Stromboli? ... Giving to those in need ... Haunted holidays at hamburger joint Credit: Newsday

What to know about the Thanksgiving storm ... Behind the scenes at a busy pie bakery ... Battle of the titans: Jets/Dolphins preview ... Trendy Bites: Thanksgiving ... Stromboli?

Loading video…

Trendy Bites: Thanksgiving ... Stromboli? ... Giving to those in need ... Haunted holidays at hamburger joint Credit: Newsday

What to know about the Thanksgiving storm ... Behind the scenes at a busy pie bakery ... Battle of the titans: Jets/Dolphins preview ... Trendy Bites: Thanksgiving ... Stromboli?

FLASH SALE

$1 for 1 year

Unlimited Digital Access

ACT NOWCancel anytime