One man was arrested Sunday hours after an Oceanside shooting that killed one teen and wounded another, police said.

Shots were fired at the Shadow Ridge Apartments on Barnard Drive at approximately 2:10 p.m. The complex houses some former foster children who have aged out of the system, according to residents. The shooting appears to have happened inside one of the units, officials said.

When Oceanside Police arrived, officers found two victims on the ground, Lieutenant Matt Cole said. One of the men was dead, the other was suffering from non-life threatening injuries.

Veronica Thomas told NBC 7 the victims were brothers who had just moved into the same unit with a man who had been living alone. It was known to some of the residents that the alleged gunman and one of the victims didn’t get along, Thomas said.

Calvin Glass Jr., 18, was arrested and booked on charges of one count of murder and one count of attempted murder.

Oceanside Police said a witness on scene helped them find Glass, who was taken into custody by Escondido Police officers at the Escondido Transit Center. Officers say he escaped using busses and trains.

Glass confessed to shooting both victims, Cole said. The victims' names were withheld pending notification of the family.

The surviving victim was taken to a nearby trauma center, police said. Both victims were adult men over the age of 18, police said.

Oceanside Police Department's Crimes of Violence unit will continue the investigation.

The manager at a neighboring apartment complex who didn't want to be identified told NBC 7 that roommate tension has been a problem with the program.

Some of the foster children were housed at her complex in the past.

“They put two girls or two guys together and once they get to know each other they don’t get along,” the woman said. “Instead of separating them it sits stews and festers."