SAN DIEGO (AP) — A federal judge has ruled that a San Diego police officer acted reasonably when he killed an unarmed man he thought was holding a knife.

The San Diego Union-Tribune reports that a judge ruled Monday in a civil rights lawsuit brought by the family of 42-year-old Fridoon Nehad.

Police were called in 2015 after reports that Nehad was threatening people with a knife. Officer Neal Browder said he found the man in an alley and shot him as Nehad walked toward him with something in his hand. It turned out to be a pen.

His family argued that Nehad hadn't posed a reasonable threat.

Dan Miller, an attorney for the family, said the ruling will be appealed.