Receive the latest local updates in your inbox

A library and a middle school in Vista were placed on lockdown Tuesday afternoon due to police activity in a nearby apartment, authorities said.

A SWAT team arrived to the apartment after hearing a gunshot near the 600 block of Eucalyptus Avenue at about 1 p.m., according to the San Diego County Sheriff's Department.

The person who allegedly fired the shot was a man. His girlfriend and his girlfriend's baby lived inside the apartment, but were not in danger at the time of the shooting, according to department spokesperson Jan Caldwell.

Caldwell said the first shot was fired when a visitor entered the apartment. The visitor was not present when authorities arrived.

When deputies arrived, they heard more shots fired inside the apartment. The SWAT team surrounded the apartment until they were sure the suspect was no longer holding the gun. They entered and immediately rendered first aid to the man, whose injuries appeared to be self-inflicted.

The girlfriend and her baby made it out of the apartment unharmed. The woman's mother was told her grandbaby was safe in the hours after the apartment was locked down.

By about 4:30 p.m., the location was secured as the suspect was transported to the hospital.

In addition to the apartment building, the Vista Library down the street and the Vista Magnet Middle School of Technology, Science, and Math were placed on lockdown while the SWAT team responded.

Authorities gathered at a staging site near the Vista Pacifica Center. The center is located on a hill in front of the apartment on Eucalyptus Avenue.

Denise Todd was on the way to the library when an officer told her there was a shooting behind the library and everything was shut down.

She was going to check out a book and the officer said, “you can’t go that way.”

“I think it’s scary, kind of, I heard the helicopters all the way from my house and I heard them saying everyone stay in your house,” she said. “It’s not something you usually see around here, all the helicopters, the noise so I knew something was going on."

The map below shows the apartment where deputies and the SWAT team responded (center) and the two lockdown locations on the left and right.