It happened at E Street and Railroad Avenue around 11:35 Monday night.
"I thought it was fireworks. But then after that, you hear semi-automatic, bup bup bup bup, and it was like 20 to 30 shots," neighbor Juanita Ramirez said.
RELATED: Funeral home shooting in Union City leaves 5 hospitalized
Ramirez lives across from the tracks. "I was just scared," she said. "Too close to home."
At mid-afternoon on Tuesday, the rail crossing was still cordoned off with evidence markers littering the crime scene.
Officers tried to stop a car with three juveniles. "Once that vehicle was stopped, two suspects get out of the vehicle and exchanged gunfire with our officers," said Union City Police spokesperson Lt. Steve Mendez.
There have been at least four shootings in Union City in the past 30 days including the shooting outside funeral home that injured five. Police looking at possible connections. pic.twitter.com/ZVuwng9EK1— Vic Lee (@vicleeabc7) June 19, 2018
One of them was hit. Both ran into the neighborhood, where they were captured. The suspect who was shot was arrested on a front lawn stained with blood.
The third suspect reportedly drove the car a few blocks away to Railroad Avenue and Whipple Road. There, police found a Toyota Camry with more than 20 bullet holes. There were also bullet holes in its windshield.
RELATED: 3 juveniles arrested after officer-involved shooting in Union City
Police arrested the driver there.
Mendez said the three suspects are all young. "Two of them were 16 years old and one was 15," he said. He said officers stopped the car because it was reported stolen.
"Our officers were in the area doing extra enforcement because we've had several shootings in Union City over the last few weeks," Mendez said.
The suspect hit in that shooting is being treated in the hospital with non-life threatening wounds.
There have been at least four shootings in the past 30 days in Union City, including an unsolved shooting at a funeral home last Thursday where five people were wounded.
Police are looking at evidence to see if they can link the suspects in this latest shooting to that one.
They did recover several weapons in the car Monday night, which they are analyzing.
Union City police say the three OIS suspects arrested in last nite's shootout are juveniles -- two are 16 and one is 15. pic.twitter.com/9z9kEOGYAI— Vic Lee (@vicleeabc7) June 19, 2018
Evidence field stretches blocks away to this lawn where wounded suspect was captured. Among evidence still here is an officer's medical bag. pic.twitter.com/khuVNCAppz— Vic Lee (@vicleeabc7) June 19, 2018
Six responding officers fired their weapons during the shootout with occupants of a car they attempted to stop. One of 3 suspects was shot. More than 20 rounds fired. No officer was hit.suspects arrested. pic.twitter.com/MyXgmVSCTl— Vic Lee (@vicleeabc7) June 19, 2018
Union City PD still at crime scene of last nite's officer involved shootings at Railroad and Whipple train crossing. pic.twitter.com/KeOFgNds9U— Vic Lee (@vicleeabc7) June 19, 2018