FARMINGTON, N.M. — An 18-year-old gunman with at least three firearms roamed through a northwestern New Mexico community and fired randomly at cars and houses Monday, killing three people and injuring six others, including two police officers before he was killed, authorities said

Officers began receiving reports of gunshots at about 10:57 a.m. in Farmington, New Mexico, a city of more than 45,000 people about 200 miles north of Albuquerque. In a video released late Monday, Farmington Police Chief Steve Hebbe said the gunman fired at least three weapons, including an AR-style rifle.

The shooting was “honestly one of the most horrific and difficult days that Farmington has ever had as a community,” he said, adding that investigators are searching for a motive for the attack, including talking to the shooter’s family.

“But at this point it appears to be purely random, that there was no schools, no churches and no individuals targeted,” Hebbe said. “During the course of the event, the suspect roamed throughout the neighborhood up to a quarter of a mile. At least six houses and three cars were shot in the course of the event, as the suspect randomly fired at whatever entered his head to shoot at.”

The shooting led to “preventative lockdowns” of the Farmington Municipal Schools at the request of police, the school district said. The lockdowns were lifted Monday afternoon.

San Juan Regional Medical Center, where victims were taken for medical care, was also locked down during the “crisis,” according to statement from the hospital, as an incident command center was put in place to organize the facility’s response.

“We worked closely with law enforcement to ensure the safety of our patients and caregivers,” said Laura Werbner, public relations coordinator for San Juan Regional Medical Center.