BERLIN (Reuters) - A Syrian asylum seeker who blew himself up in the southern German town of Ansbach on Sunday was influenced by an unknown person in a chat conversation on his mobile phone, Bavaria's Interior Minister Joachim Herrmann said on Wednesday.

"It's possible to deduce that another person wherever they were at the time of the call, of the chat, significantly influenced how the attacker acted," Herrmann said on the sidelines of a meeting of the Bavarian cabinet.

"The chat ended directly before the attack," he added.

Officials say the bombing by the 27-year-old Syrian, who had arrived in Germany two years ago, was clearly a terrorist attack, citing a video found on his mobile phone in which he talks of planning an "act of revenge" against Germans.

The man set off explosives in his rucksack on Sunday outside a musical festival in Ansbach, a town of 40,000 people southwest of Nuremberg, killing himself and injuring 15 people.

Police are trying to find out whether the attacker had help in making the bomb and whether it exploded prematurely, which could suggest he wanted to kill as many people as possible.

"There are indications that the attacker did not want to ignite the bomb at this moment," a spokesman for the Bavarian Interior Ministry said.

The attack on Sunday was the fourth act of violence by men of Middle Eastern or Asian origin against German civilians in a week and is likely to fuel growing unease about Chancellor Angela Merkel's open-door refugee policy.

More than a million migrants entered Germany over the past year, many fleeing war in Afghanistan, Syria and Iraq.

Herrmann told the Handelsblatt newspaper that not every refugee should face suspicion, but it was vital to get a better handle on the identities of those seeking asylum.

"We have a significantly higher risk in connection with Islamist extremists, whether the flood of refugees are being specifically misused or whether people are radicalizing themselves here," Herrmann told the newspaper in an interview to be published on Thursday.

Investigators found a video on the Ansbach bomber's mobile phone in which he pledged allegiance to militant group Islamic State, which later claimed responsibility for the bombing.

On searching his room, Nuremberg police found diesel, hydrochloric acid, alcohol, batteries, paint thinner and pebbles -- the same materials used in the bomb -- and computer images and film clips linked to Islamic State.

(Reporting by Reuters TV and Joern Poltz; Writing by Caroline Copley; Editing by Richard Balmforth)