A Veterans Affairs document obtained by The Associated Press says the gunman who killed a Colorado sheriff's deputy escaped from the mental health ward of a VA hospital in Wyoming in 2014 but was located and returned.

This undated photo released by the Douglas County Sheriff's Office shows Matthew Riehl. The 37-year-old man was shot to death Sunday, Dec. 31, 2017, after shooting at the deputies, killing one.

Courtesy Douglas County Sheriff via AP

The document was provided to the AP by a congressional aide on condition of anonymity because the aide was not authorized to release it.

The document was first reported by The Denver Post.

Colorado authorities say Matthew Riehl fatally shot Douglas County Deputy Zackari Parrish and wounded four other officers on Sunday. Riehl was killed by a SWAT team.

The VA document says Riehl was hospitalized at the veterans medical center in Sheridan, Wyoming, in April 2014 after a psychotic episode. It says he escaped but was found and brought back.

The document identifies Riehl as an Army veteran who was honorably discharged.

The slaying of a Colorado sheriff's deputy is the most recent in a string of fatal shootings involving suspects who may have had mental health problems, and the state has expanded services in hopes of finding a solution.

Colorado opened 12 walk-in mental health crisis centers across the state and set up a 24-hour hotline after a gunman killed 12 people in a suburban Denver movie theater in 2012. Doctors testified the gunman, James Holmes, was mentally ill.

Holmes pleaded not guilty by reason of insanity. But the jury rejected his plea and convicted him of murder.

The Colorado Department of Human Services said the state has provided help more than 580,000 times under the expanded services, but some of those instances might have been one individual getting help multiple times.

Editor's Note: This story was updated to clarify numbers from the Colorado Department of Human Services. The department said Wednesday that agencies have provided mental health services more than 580,000 times, but some of those instances might have been one individual getting help multiple times.