The 23-year-old Afghan asylum seeker who was arrested in connection with the stabbings of four people Wednesday night in Vienna has confessed to the attacks, saying he stabbed them because he was “in a bad mood”.

The man was arrested Wednesday night after two separate stabbing attacks in Leopoldstadt, the second district of Vienna.

During his police interrogation, he said that the first attack was motivated by his “bad mood” over his life situation. The second attack was related to the Vienna drug scene and the Afghan blamed the fourth victim for his drug addiction.

The first attack, which occurred at 7:45 pm, saw a 67-year-old Viennese dentist, his 56-year-old wife, and 17-year-old daughter stabbed outside a Japanese restaurant near the Nestroyplatz metro station. While the mother and daughter are said to be in stable condition, the dentist is still fighting for his life, Kronen Zeitung reports.

A second attack occurred near the Praterstern train station, which is also in the second district and well-known for migrant criminality. The Afghan attacked a 20-year-old Chechen migrant in front of a snack bar, stabbing him. The Chechen was also in critical condition but is stable after being treated at a local hospital.

Shortly after the second attack, police were able to locate the Afghan migrant and place him under arrest. They found two knives in his possession.

Sources who spoke to Kronen Zeitung claimed that the Afghan may have been living in Vienna illegally as a “submerged” migrant.

Migrant Brutally Murders Woman on Vienna Street https://t.co/tIdNDdIK4t pic.twitter.com/N1Nk2SQjVh — Breitbart London (@BreitbartLondon) May 5, 2016

The attack is not the first random attack perpetrated by a migrant in Vienna. In 2016, a 54-year-old woman was brutally bludgeoned to death by an illegal migrant from Kenya in the Ottakring district as she was headed to work.

Earlier that same year, a Gambian illegal migrant was arrested after murdering an American nanny living in Vienna who had taken the man in to hide him from deportation.

More recently, in September of last year, an 18-year-old Afghan migrant was arrested by police in Vienna for stabbing his 14-year-old sister to death in an apparent honour killing because she refused to go to school.

Wednesday’s knife attack also comes just after Hungarian minister János Lázár released a video claiming that migrants in Vienna had made the city more prone to crime. Lázár’s video was initially censored by Facebook but was restored several hours later.