BERLIN—A Syrian man went on trial Monday accused of killing a German man and seriously injuring another in an attack last year that prosecutors said was motivated by Islamic extremist ideology. The trial of Abdullah A.H.H., whose full name wasn’t released due to German privacy laws, began in the eastern city of Dresden, where the attack took place on Oct. 4. Federal prosecutors allege that the defendant used kitchen knives to attack the two men in their 50s from behind because they were holding hands and he believed they were a gay couple, which he considered to be a “grave sin.” The 21-year-old was arrested almost three weeks after the crime and has been in custody since then. The defendant is charged with murder in the killing of the 55-year-old victim and the attempted murder and serious bodily harm of the 53-year-old man. A forensic psychiatrist testified in court that …