A 27-year-old Syrian asylum seeker who blew himself up in the southern German town of Ansbach was chatting online with a still-unidentified person immediately before the explosion, Bavaria's interior minister has said.
Attacker Mohammed Daleel died and 15 people were wounded when his bomb exploded outside a wine bar on Sunday night after he was denied entry to a nearby open-air concert because he did not have a ticket.
"There was apparently an immediate contact with someone who had a significant influence on this attack," state interior minister Joachim Herrmann said in Bavaria, news agency dpa reported.
It was not clear whether Daleel was in contact with Islamic State or where the other person involved in the conversation was, Mr Herrmann said.
He said investigators checking the assailant's mobile phone came across the "intensive chat" and that "the chat appears to end immediately before the attack".
"Because of witness testimony on what happened and also the course of the chat, there are indeed questions about whether he intended to set off the bomb at that moment," Mr Herrmann said.
On Tuesday night, the online magazine of IS said the attacker spent months planning the attack, once even hiding his homemade bomb in his room in a state-supported asylum shelter moments before a police raid.
The weekly Al-Nabaa magazine's report added that Daleel had fought in Iraq and Syria with a branch of al Qaida and IS before arriving in Germany as an asylum seeker two years ago.
Mr Herrmann said a roll of 50-euro notes was found on the attacker. It is unclear where the money came from - but it is "unlikely that it could have been paid for solely from what an asylum seeker in Germany gets in the way of pocket money". He did not disclose the total value of the cash.
The Ansbach explosion was the last of four attacks in Germany in a week, two of which were claimed by IS. Islamic extremism was not the motive in the other two - including the deadliest, Friday's shooting in Munich in which nine people were killed.
The German government said US president Barack Obama offered his sympathy to Chancellor Angela Merkel over the attacks in a phone call on Wednesday. Both stressed their will to continue fighting international terrorism together and with determination, the government said.
The attacks have brought Mrs Merkel's policy of welcoming refugees - more than one million last year - under renewed criticism.
A senior figure in the nationalist Alternative for Germany party, which has no seats in the national parliament but saw its popularity surge after last year's migrant influx, suggested that there should be "a halt to immigration for Muslims to Germany" until all asylum seekers now in the country have been registered, checked and had their applications processed.
"For security reasons, we can no longer afford to allow yet more Muslims to immigrate to Germany without control," Alexander Gauland, a deputy party leader, said in a statement. "There are terrorists among the Muslims who immigrated illegally and their number is rising constantly."
But interior ministry spokesman Johannes Dimroth said that "for some time" all new arrivals have been registered and checked against security databases.
As for whether people could be treated differently depending on their religion, "as I understand it that simply would be incompatible with our understanding of freedom of religion", he said.
Conservative politicians have called for an increased police presence, better surveillance and background checks of migrants - and new strategies to deport criminal asylum seekers more easily.
Al Nabaa's Arabic-language report on the attacker said he initially fought against government forces with al Qaida's branch in Syria before pledging allegiance to IS in 2013. He also helped the group with its propaganda efforts, setting up pro-IS accounts online.
In Germany, he started making the bomb, a process that took three months, al Nabaa wrote.
IS earlier claimed the Ansbach attack, publishing a video it said was of Daleel pledging allegiance to the group and vowing that Germany's people "won't be able to sleep peacefully anymore". It appears to be the same video as the one found by German investigators on the suicide bomber's phone.
Daleel unsuccessfully sought asylum in Germany and was awaiting deportation to Bulgaria.
The bloodshed in Germany began on July 18, when a 17-year-old from Afghanistan wielding an axe attacked passengers on a train near Wuerzburg, wounding five people before he was shot dead by police. IS claimed responsibility.
German train operator Deutsche Bahn said it would invest heavily in increased security and hire hundreds of security staff to control trains and train stations across the country.
The city of Munich said it is re-evaluating security for the annual Oktoberfest and is considering banning backpacks from the popular beer festival.