A 19-year-old Afghan citizen who was shot and detained by police after stabbing two American tourists in Amsterdam's main railway station had a "terrorist motive," city officials said Saturday.

The suspect, who has a German residence permit, was questioned Saturday by police in the hospital where he was being treated for gunshot wounds to his lower body. He was being held in solitary confinement and will be brought before an investigative judge Monday to decide whether he remains in custody. Dutch officials did not say what charges he could face.

"First statements made by the suspect indicate he had a terrorist motive," the Amsterdam city council said in a statement. German police searched the man's house at the request of their Dutch colleagues and seized several data carriers, the authorities said.

The two U.S. citizens injured in the attack were recovering in a hospital from what police said were serious but not life-threatening injuries.

Pete Hoekstra, the U.S. ambassador to the Netherlands, said Saturday that the injured Americans were tourists visiting the city.

A photo taken by a passer-by showed two police officers pointing their guns at a man in blue jeans and sneakers lying on the ground inside a train station tunnel.

Earlier this week, Dutch police arrested a 26-year-old man suspected of threatening to attack far-right politician Geert Wilders because of his planned contest of cartoons depicting Islam's Prophet Muhammad. Wilders canceled the contest Thursday, citing security concerns, as thousands of people in Pakistan marched to protest it, and the Taliban in Afghanistan called for attacks on Dutch troops serving in that nation.

The Netherlands has been considered a target since attacks by Islamist radicals in France, Belgium, Britain and Germany, and because it supports U.S.-led military operations against the Islamic State terror group in the Middle East.

The last major attack in the Netherlands was the killing in 2004 by a Muslim radical of Theo van Gogh, an outspoken filmmaker and great-grandnephew of the legendary painter.