CLOVIS, N.M. -- Two women were killed and four others injured when gunfire erupted inside a public library on Monday, throwing an eastern New Mexico community into a panic as officers swarmed the building with their guns drawn.

Police Chief Doug Ford said the gunman was taken into custody, but there was no indication of what may have prompted the violence which began around 4 p.m. local time. No charges have been filed yet, but the chief said warrants were being prepared.

Three of the injured victims were taken to a hospital across the state line in Lubbock, Texas, Clovis City Manager Tom Phelps told The Eastern New Mexico News.

Get Breaking News Delivered to Your Inbox

City officials and law enforcement officers held a news conference to say the four people who were injured include two men and two women. Their conditions were not immediately known.

One woman could be seen being helped into an ambulance while the call for air ambulances could be heard over police radio traffic.

The names of the gunman and the victims were not immediately released.

Following the incident, Sen. Tom Udall of New Mexico wrote on Twitter that he's "heartbroken by the horrific events in Clovis."

I'm heartbroken by the horrific events in Clovis tonight. Please join Jill and me in keeping Clovis in your thoughts and prayers. — Tom Udall (@SenatorTomUdall) August 29, 2017

"We still don't know all the details," City Commissioner Juan Garza told The Associated Press. "What we've been telling people is to keep on praying for the families affected by this tragedy."

Clovis Mayor David Lansford called the shooting tragic and senseless. He said it is big blow to the community and that Clovis is hurting. He asked for prayers for the victims.

A viewer submitted video to CBS affiliate KRQE-TV in New Mexico that apparently shows a suspect being arrested by police.

KRQE-TV writes that Vanessa Aguirre was in the library with her son when a man came in and "started to shoot" into the air.

Aguirre said she did not see anyone get shot, but the shooter was still in the library when she left.

Clovis, a city of about 40,000, is about 200 miles east of Albuquerque, near the Texas state line. It is home to Cannon Air Force Base and the nearby community of Portales is home to Eastern New Mexico University.

Attorney General Hector Balderas, the state's top prosecutor, said his office had reached out to the district attorney to offer any help.

"New Mexico's thoughts and prayers tonight are with the victims, their families and the first responders on the ground," Balderas said in a statement.

Sojung Her, a 26-year-old cashier at the Shogun Japanese Steakhouse within view of the library lawn, said the shooting left behind a sense of fear and vulnerability.

"It's kind of a freak thing," she said. "What if he just walked into our restaurant and started shooting."

Police cars and tactical officers crowded the streets outside as she arrived to work at the restaurant late Monday afternoon.

"This kind of thing never happens here," she said.

Vanessa Aguirre told The Eastern New Mexico News that she was in the library with her son when a man came in and started to shoot into the air.

"It all happened so fast," she said. "We took off fast."

Witnesses describe a terrifying scene when the young man opened fire in what everyone thought was a safe, quiet place, KRQE-TV reports.

"He just started unloading, pretty much the whole clip. I just kept my head down. I threw the table against the door to barricade myself in there. I thought he was coming my way but by then the cops got there," witness Sam Nathavong said.

Nathavong said he's not sure how long the gunman was inside the library, but it felt like forever.

The station adds that the library is closed until further notice as the investigation is underway.