One person was killed and two others were wounded Tuesday when an assailant armed with a military-style rifle opened fire in a residential area of Azusa, forcing authorities to secure the neighborhood and shut down nearby polling places—sending voters scrambling to find alternate locations.

After a standoff at a home that lasted several hours, police announced that the gunman had been found dead in the residence. Officials said they didn’t know whether the man — who was described as heavily armed — was killed by police during a short but furious gun battle or from a self-inflicted gunshot wound.

"We're in the process of figuring out why this happened," Los Angeles County Sheriff’s Lt. John Corina said.

By Tuesday afternoon, Azusa police said it was too early to determine a motive. At least one victim had been on his way to vote, a law enforcement source told The Times. Sheriff’s Capt. Steven Katz said the violence was not related to the election and the location near a polling place was merely a coincidence, though he warned that all of the information was preliminary.

Los Angeles County Fire Capt. Ron Singleton said that two people were airlifted to a hospital. The third victim, a man in his 70s, was dead at the scene, he said.

The shooting began about 2 p.m., when gunfire was reported in the 300 block of North Orange Avenue.

Responding officers were tending to the victims when they were met with a hail of gunfire by a gunman armed with an assault rifle with “a rapid-fire capability,” acting Azusa Police Chief Steve Hunt said. The shooter immediately fired at least 20 shots at police, a law enforcement source said.

Officers took cover and returned shots at the assailant, who retreated into a home in the 500 block of Fourth Street. No officers were injured.

“I heard this ‘boom boom’ like a rifle or shotgun, and then I heard ‘pop pop’ back, then boom boom again," said neighbor Hector Serrano, 21.

"I came outside and [police] were throwing gas at the house."

Roberto Chavez, 67, and his wife were sitting on their porch when they spotted a heavily armed man fire at least 10 rounds at a group of people.

The gunman, who wore a white shirt and black pants, ran into a home about three doors down from his house, Chavez said.

Chavez said he didn’t know the man’s name but recognized him as someone who frequently visits and hangs out at his neighbor’s home.

Police told Chavez to remain indoors because the gunman had barricaded himself inside a home, he said.

Another neighbor saw the same man as he was walking away from the Memorial Park parking lot.

“I just ran inside,” Fabiola Morena, 47, said after the man stopped to reload his weapon and glanced her way. “I secured the door, grabbed my granddaughter and ran into the bathroom, and we locked ourselves there.”

Inside the home, she heard police sirens and more gunshots.

“I don’t know if he shot at the police or they shot at him, but it was several gunshots,” said Morena, who spoke to The Times by phone while locked in the room. “I was afraid a bullet would come through the walls of the house.”

Liberata Collela, who lives next to the residence that the shooter entered, said she was at home with a friend and heard dozens of shots. She also said a vehicle smashed into her parked car.

"Someone got out of the car. It was really scary,” she said. “All the guns were targeting the house next door. The shots were going back and forth.”

Collela said she saw a body lying near the front door of the next-door house. She was startled when officers knocked on her window. They escorted her and the friend into an armored car.

Authorities had not identified the victims by early Tuesday evening, but two women were in critical condition. Paramedics airlifted them to a hospital. The vehicle that crashed in front of the home was driven by a motorist who was hit by gunfire from the shooter, according to Katz, who oversees the Sheriff’s Department homicide unit.

Sheriff's officials sent a robot with a camera toward the suspect late Tuesday afternoon and were able to confirm he was dead. The shooter, who was not identified, was found in an entryway to the home, lying next to a rifle, Katz said.

Officials said that an earlier report by authorities that the shooter was a woman was the result of “misinformation” as the events were unfolding.

Police believe the home where the suspect was found was empty when he broke in. It was not clear whether the suspect resided there or even lived in Azusa, Katz said.

The shooting unsettled Azusa — a bedroom community of 50,000 that marks the entrance of the San Gabriel Canyon — on the eve of a contentious election.

The Azusa Unified School District issued a lockdown for Slauson Middle and Mountain View Elementary schools about 2:15 p.m., officials said. A nearby daycare center and preschool was also locked down.

As helicopters droned above, residents attempted to navigate around sheriff’s cruisers stationed in multiple intersections, cutting off traffic. Some approached officers outside the city’s police headquarters, searching for a place to vote. Residents were told they could cast a provisional ballot anywhere in the county.

Rosa Valdovinos, 62, said she had raced to Memorial Park, where some children who attend nearby schools huddled on a bleacher, and was relieved to learn her grandson had already been picked up by a relative. Still, she was rattled by the violence.

“We never have this happen before here in Azusa. Especially with the election? It's weird,” Valdovinos said. “There are so many crazy people, acting emotionally.”