Saudi Arabia confirmed that it was working with German investigators to track down suspected Isis militants behind axe and suicide bomb attacks in Germany, in a rare public statement on its security operations.

A spokesman for the Saudi interior ministry, General Mansour al-Turki, told Reuters that German and Saudi officials had met to exchange information, after evidence indicating that one of the refugees responsible for recent terror attacks in Germany had been in contact with an Islamic State militant on social media using a Saudi phone number.

"The investigation is still ongoing between experts in both countries to try to find the parties to the case," Turki told the news agency.

He said the individual who instigated the attack was in an unspecified "country of conflict," but declined to provide his nationality.

A 17-year-old Afghan refugee armed with an axe and knife seriously injured five people on a train near Wuerzberg on 18 July before being shot dead by police. Six days later Syrian Mohammad Daleel, 27, injured fifteen people in a suicide bomb attack in the Bavarian town of Ansbach.

On Saturday a senior Saudi government official told Spiegel that Riyadh would "jointly do everything possible to clarify the backgrounds of the attacks".

Isis claimed responsibility for both of the attacks, and released videos of both men pledging allegiance to the group. Spiegel reported last week that the two perpetrators had been in contact with Isis militants online, who had not just encouraged but given them specific instructions.