A Colorado sheriff's deputy shot and killed by a man whose mental health problems previously raised alarms was laid to rest Friday.

A long motorcade of law enforcement officers from around Colorado and beyond escorted the hearse carrying the body of 29-year-old Zackari Parrish to a church in the Denver suburb of Highlands Ranch for his funeral. The procession along Interstate 25 was led by about 80 officers on motorcycles and ended with bagpipers and drummers escorting the hearse to Cherry Hills Community Church.

Along the way, saluting firefighters stood atop a firetruck and others watched on overpasses and along local streets. In two spots, large American flags were hung from ladder trucks.

Thirty-seven-year-old Matthew Riehl, a veteran and former Wyoming lawyer, fired on Parrish and three other deputies who responded to a 911 call he made from his apartment early New Year's Eve. He was later killed by a SWAT team in a gunfight.

The FBI says a 72-hour mental health hold that was once issued for Riehl probably didn't make it illegal for him to buy guns.

FBI spokesman Stephen G. Fischer Jr. said Friday the mental health hold issued in 2014 for Riehl was likely just to keep him under observation.

Federally licensed dealers cannot sell guns to people if a court or another authority has determined they're a danger to themselves or others. People who've been involuntarily committed to a psychiatric institution are also ineligible.

Nothing made public about Riehl so far appears to meet those standards.

A Veterans Affairs Department document and police reports say Riehl, an Army veteran, had mental health problems.