The Moroccan teenager accused of carrying out Finland’s first jihadist terrorist attack had been flagged months ago for extremist views, around the time he was denied asylum, the authorities said on Monday.

The teenager, Abderrahman Mechkah, 18, stabbed two women to death and injured eight other people on Friday afternoon in the center of Turku, a city of about 180,000, according to the police. Officers shot and injured him.

The authorities are treating the case as an act of terrorism targeting women.

The police in southwestern Finland got a tip at the beginning of this year about the teenager, saying he was “radicalized and interested in extremist thinking,” according to Jyri Rantala, a spokesman for the Finnish Security Intelligence Service, or SUPO.

The tip was passed on to the intelligence service but was not given priority because there was no reference to a specific threat, Mr. Rantala said.