Receive the latest california updates in your inbox

A man who was killed in a shoot-out at a deputy station in Temple City had just registered as a sex offender, but what was he doing there in the first place? Lolita Lopez reports for NBC 4 News at 5 on Monday, March 20, 2017. (Published Monday, March 20, 2017)

A man who was registering as a sex offender Monday morning at a Los Angeles sheriff's station opened fire on deputies when they followed him from the lobby and back out to his vehicle, leading to a parking lot gun battle, according to investigators.

The shootout was reported at about 8 a.m. at the Los Angeles County Sheriff's Temple City Station, about 15 miles northeast of downtown Los Angeles. The man was in the station's lobby earlier Monday as part of the sex offender registration process, but went back into the parking lot, authorities said.

Deputies followed the man into the lot after realizing he was wanted in connection with a separate sex crime in Los Angeles, according to the sheriff's department. A warrant had been issued in connection with the case, authorities said.

The shooter, identified only as a man in his late 40s, went to his Chevrolet sport utility vehicle parked in the lot and opened fire on deputies as they approached, LA County Sheriff Jim McDonnell said. The man also had a protective vest, investigators said.

"The suspect went to his vehicle and was shooting from the vehicle," McDonnell said.

Several deputies returned fire.

After the gunfire, the man remained unresponsive for several minutes and SWAT members approached the Chevrolet sport utility vehicle. Authorities later confirmed that the man was dead in the SUV's back seat.

A shotgun was found in the SUV, according to investigators. Investigators are attempting to determine whether the man was killed in the shootout or died from a self-inflicted gunshot.

Roads near the station in the 8800 block of Las Tunas Drive were closed for the investigation.

"We see these all too frequently now," said McDonnell. "This is the third officer-involved shooting in the area this morning. We're very, very fortunate and very thankful that no deputies were injured or killed."

Shootings involving law enforcement also were reported Monday morning in Huntington Beach and Van Nuys, where two men were arrested after an overnight neighborhood search. In Huntington Beach, officers opened fire on a man who remained hospitalized Monday morning with non-life threatening injuries.

Last week, a San Bernardino County Sheriff's deputy was fired on as he responded to a robbery at a gas station.