PORTERVILLE, Calif. (AP) — A man shot and killed a central California sheriff’s deputy Thursday morning while authorities were serving an eviction notice and hours later he remained barricaded inside the home, authorities said.

Tulare County deputies were serving an eviction notice at a home in Porterville when a 60-year-old man opened fire on them, the department wrote on Facebook.

Sheriff Mike Boudreaux said at an afternoon news conference that SWAT teams were clearing nearby homes and the situation remained extremely dangerous. Residents were urged to shelter in place and nearby schools were on lockdown.

Authorities say the man is still barricaded inside the home and believed to be armed with a rifle, news station KFSN reported. Porterville is located about 150 miles northeast of Los Angeles in the state’s Central Valley.

Bystander video shot from a driveway and posted by the Visalia Times-Delta shows several armed deputies crouched on the ground in the roadway when a series of shots ring out and some of the deputies run away. The gunman cannot be seen from the video. Additional video shows someone being carried into an emergency medical vehicle.

Boudreaux said the man had failed to pay rent for 35 days and had been expecting law enforcement to arrive to serve a final notice for eviction. Boudreaux said he “laid in wait” and immediately shot at officers when they arrived.

The deputy that was shot was part of a group of officers that arrived to help after gunfire began, Boudreaux said. He was taken to a hospital where he died.

“This is senseless,” Boudreaux said.

Miguel Ibarra’s 82-year-old mother lives across the street from the gunman and was among residents evacuated due to the barricade. Ibarra, who lives in Orange County, said it was surreal to see his parents’ house on TV in what is normally a quiet, boring neighborhood.

“The police did a really good job keeping us informed and keeping us in the know of what’s going on,” he said.