A California man apparently upset by President Barack Obama’s executive action on gun control opened fire on an apartment complex before police shot him dead.

Witnesses called 911 about 6 p.m. Tuesday to report the man, whose name has not been released, firing indiscriminately at the apartment building in Redding, reported the Record Searchlight.

Kathy Lunsford, who lives in the building, said the man grabbed her and pulled her into his apartment before he started shooting.

ADVERTISEMENT

“As soon as he shut the door, he hugged me and he kissed me on the forehead,” said Lunsford, who had spoken to the gunman before but said they were not friends.

She said her neighbor then fired at another man, and she begged him to stop.

“He was aiming at a guy, and then he just got sloppy — he was shooting everywhere,” Lunsford said.

Witnesses said the gunman was ranting incoherently about gun control measures proposed by Obama, who announced executive actions earlier that same day intended to keep firearms from being sold to criminals and the mentally ill.

“We heard the five shots — everyone was screaming,” said David Rice, who lives near the apartment complex. “He came out screaming ‘Obama! Obama! Obama!’ (Police) told him to come out with (his) hands up, and he kept telling them ‘No, no, no.’”

ADVERTISEMENT

Officers fired non-lethal beanbags at the man, who refused to drop his weapon after walking in and out of the apartment at least 10 times, and police shot and killed the gunman after he came out of his apartment with his gun drawn.

One neighbor said police fired at least 30 rounds, but another neighbor said he heard about 70 shots.

“It was insane,” said neighbor Steven Killion.

ADVERTISEMENT

A neighbor recorded video that shows the man walking out of his apartment’s front door holding the weapon as shots rang out.

Police have confiscated the neighbor’s video and don’t intend to release it to the public.

ADVERTISEMENT

A spokesman for Redding police said he was unable to confirm whether the man had fired at officers during the incident.

A neighbor said the man warned police he had a gun and intended to shoot them.

Investigators are waiting to release the man’s name until they can notify his next of kin, but he was described as a white man in his 50s.

ADVERTISEMENT

The Record Spotlight reported that the man identified on a search warrant at the apartment had prior felony convictions — which would have prevented him from legally owning a gun.

Court records show the man pleaded no contest in 2009 to the illegal discharge of a weapon and was sentenced to 60 days in jail, and he was sentenced to an additional 45 days in jail the following year on a probation violation.

He also had a misdemeanor battery charge dismissed in 2004 after he was placed on probation.

A longtime friend said the man suffered from depression, anger and bouts of confusion for many years — and she said those mental health issues were the cause of his legal problems.

ADVERTISEMENT

Police said they found a 9 mm Beretta handgun with a spent shell casing in the chamber and live rounds in the gun’s magazine at the man’s apartment.

The newspaper reported that a letter from the National Rifle Association addressed to the man was posted on the apartment’s front window.

The letter requested the man pay for a DVD that he had bought from the gun lobbying organization titled “Combat Shooting and Home Defense Tips.”

Watch this video of police describing the shooting investigation: