BERLIN — Searching the cab of the tractor-trailer that plowed through a Christmas market in Berlin, the authorities made two startling discoveries: a badly bruised body with stab and gunshot wounds, and the wallet of a Tunisian labeled a security threat who was supposed to have been deported months ago.

The identity of the Tunisian, Anis Amri, immediately alarmed intelligence officials from Europe to Washington. German officials acknowledged that Mr. Amri was known to have links to a radical Salafist preacher and had been in their custody pending deportation proceedings after being caught with fake papers. He was freed, even though he was considered potentially dangerous by the authorities.

He also appeared on the radar of United States agencies, according to American officials. He had done online research on how to make explosive devices and had communicated with the Islamic State at least once, via Telegram Messenger, said the officials, who spoke on the condition of anonymity because of the investigation. He was also on a United States no-fly list, the officials said on Wednesday evening.

As an intense hunt for the man who may be behind Germany’s worst terrorist attack since reunification took on even greater urgency, the authorities were being dogged by questions over what more they should have done to track or detain him. Mr. Amri remains on the run with a reward of 100,000 euros (about $104,000) for information leading to his arrest.