Police have taken a suspect into custody after a UPS driver was shot and killed inside his truck in Irvine, California, on Thursday afternoon.

The shooting took place at around 3 p.m. near Chrysler and Bendix in the city, according to Irvine police on Facebook.

Sgt. Karie Davies told FOX 11 LA the UPS driver was on break and eating inside his truck when the suspect, who has not been identified, pulled up in a pickup truck and started shooting. Police believe the shooter was wearing a face mask.

USPS MAIL CARRIER SHOT AND KILLED ON THE JOB, POLICE OFFERING $250K REWARD FOR INFO

UPS truck at crime scene

A UPS driver was shot and killed in what police believe was a targeted attack on Thursday in Irvine, California. (FOX 11 LA livestream/Screenshot)

Officers are working to determine if the driver and the suspect knew each other and if there was a potential motive behind the shooting, Davies said.

"We don't know exactly what the relationship is between these two gentlemen, if any," Davies said. "This definitely seemed targeted, meaning it wasn't a robbery, didn't appear to be a robbery."

A few hours later, at around 6 p.m., authorities located the truck of the suspected shooter near Santiago Canyon Road and the Toll Road. The suspect barricaded himself inside his vehicle, but was eventually forced out of it after a chemical agent and a police dog were deployed, Davies said.

"He did not peacefully give up. He was lured out of the vehicle, or forced out of the vehicle by our SWAT team, but he is alive," Davies said.

Silver pickup truck barricaded by police vehicles

The shooter accused of killing a UPS driver on Thursday in Irvine, California, barricaded himself inside his truck before police forced him out and arrested him. (FOX 11 LA livestream/Screenshot)

Community members told FOX 11 the UPS driver was known in the area and typically ate his lunch in the same spot.

"I mean he's a friendly gentleman, he never really displayed any sort of attitude, any sort of negativity or anything like that. Just kind of like your normal delivery guy," Kevin Sanchez told the outlet, adding that the slain driver had delivered their packages for years. 

CALIFORNIA MAIL CARRIER FIGHTS BACK AFTER GETTING SUCKER PUNCHED, VIDEO SHOWS

UPS issued a statement on the driver's death and said the company will be assisting authorities in any way possible to "understand what happened."

"Our hearts are heavy tonight with the news of the loss of one of our drivers in Irvine, CA. We are assisting authorities however we can to understand what happened. As a result of the ongoing investigation to find those responsible, we are deferring any additional questions to authorities. The safety and well-being of our employees is our top priority, and we are providing support and counseling services to our employees affected by this tragedy," UPS said.

CLICK HERE TO GET THE FOX NEWS APP

Irvine police said the deadly shooting remains under investigation and urged anyone with information to call 949-724-7200.

"Thank you to the community for your concern as we investigated the tragic homicide that occurred today. Our hearts are with the victim and his loved ones," the department wrote on Facebook.