The man, now 53, had his first session at the Northern Vaud Criminal Court, where he is being heard for the death of the woman, then 42, and their eldest son.

His defense, quoted by Swiss daily 24Heures, said that “in a case like this” it is necessary to “understand how this man works”.

The man acknowledged that there were "disagreements" with his wife, but said he did not understand how something turned into "barbarism".

The defendant denied going to the woman's apartment to kill her, but did not explain why he took a loaded gun and a second magazine, according to the Swiss news agency (ATS).

The Portuguese claimed that he pointed the gun at the ceiling. On leaving the apartment, his eldest son ran at him and he fired the first shot. The defendant said he did not remember what happened next.

“All this took a few seconds. I don't remember and I make a point of not remembering”, he added, quoted ATS.

The man also said he was "100% sure" that he had never assaulted his wife in the years prior to the crime, claims denied by his youngest son, who was present at the hearing and who said he saw his mother being assaulted frequently, according to the same source.

According to the facts described in the indictment, published by the same daily, the murders culminated after a long period of arguments and aggressions apparently dictated by the man's jealousy in relation to his wife, who worked as a cleaner.

The Portuguese couple moved to Payerne, Switzerland, in 2006 with their two young children.

The relationship deteriorated from 2012, with insults, attacks and death threats, which led to the departure of the woman with her two children, aged 18 and 13, in September 2017, to an apartment next to the train station in Payerne.

The emigrant, then 49 years old, continued to harass the woman, sending her a few days before the crime, about 70 text messages calling her "a liar" and a "slut" on the night of April 22-23.

On April 25, after work, the man went to his former partner's house and, according to the Swiss-French newspaper, fired more than 30 shots at his son and wife.

After hitting the young man, the murderer emptied a magazine on the woman, reloading the weapon, executing his former partner and her son, who had taken refuge, seriously injured, in another area of the residence.

According to Gazeta Lusófona, the man turned himself in to the police during the night, after a negotiation that lasted five hours, and was licensed to carry a firearm in Switzerland.

The Portuguese man faces a sentence of between 10 years and life.