BERLIN  The arrest of two terrorism suspects at the Cologne-Bonn Airport and a nationwide search for two others rattled Germany on Friday.

German police officers boarded a KLM airliner at 6:55 a.m., shortly before it was to take off, and seized two men who were identified as a 23-year-old Somali and a 24-year-old German born in Somalia. Officials said that the men were unarmed, but that documents saying that they were ready to fight and die in a jihad had been found.

The men had been under surveillance for some time, according to a German security official, speaking on the condition of anonymity because he was not authorized to discuss the case. Their travel plans had them going to Uganda by way of Amsterdam, the official said, with a likely final destination of Somalia.

The extent of any threat posed by the two men was far from certain on Friday. Their arrests were the second set of terrorism-related arrests in barely over a week, as German officials charged with preventing a terrorist attack on their country said they saw signs of heightened activity among radical Islamists.