A Czech court convicted an American of killing four of his relatives and sentenced him to life in prison.

Judge Michal Zamecnik said Wednesday that Kevin Dahlgren, 24, fatally stabbed his cousin, her husband and one of their two sons in "a very brutal way" in their home during his visit to the Czech city of Brno on May 22, 2013. Zamecnik said Dahlgren later in the day attacked their other son when he returned home from school, likely with a stone, and also stabbed him.

Dahlgren had spent three weeks with the family. Life imprisonment, the maximum sentence in the Czech Republic, was demanded by the state prosecution.

"The crime (Dahlgren) committed is extraordinary serious," Zamecnik said. "He was trying to solve problems with his own ego, with his own feelings and he solved those problems by completely wiping out the entire family."

Dahlgren, of Palo Alto, California, was detained at Washington Dulles International Airport the following day. Last year, he became the first U.S. citizen to be extradited to the Czech Republic.

Dahlgren refused to testify at the regional court in Brno.

But he used his right to give a a final speech, saying on Tuesday that "What happened to the family was a tragedy."

Dahlgren suggested he was mentally ill, and that would mean he could not be held responsible for what happened.

In the past, he said, "the voices in my head wanted me ... to destroy everything, all the time."

The judge dismissed that. Zamecnik said experts acknowledged Dahlgren was mentally unstable and had a tendency to aggressive behavior but he "was not suffering from any mental illness."

"Not only did he committ the crime, but he is also fully responsible for it," he said.

The verdict is not final. Dahlgren immediately appealed and the case goes to an appeals court in the city of Olomouc.