LOS ANGELES — The semi-automatic assault-style rifle that authorities say an ex-con used to shoot three California Highway Patrol officers Monday — one fatally — was a homemade "ghost gun" designed to skirt the state's strict ban on such weapons, multiple law enforcement sources told NBC News.

It is at least the third semi-automatic assault-style rifle assembled from parts used in a high-profile shooting in California since 2013.

The shooter, 49-year-old Aaron Nathaniel Luther, had a criminal record dating back to 1992. He spent a decade in state prison after a conviction for the attempted second-degree murder of a police officer as well as three counts of burglary, according to court records.

Aaron N. Luther in a 2004 booking photo. California Department of Corrections and Rehabilitation via AP

Luther was shot dead in a gun battle with CHP officers in Riverside on Monday evening. His felony convictions should have prohibited him from possessing or purchasing any firearm under California law.

But the sources said he was able to construct an illegal homemade assault rifle with a high capacity magazine by using unregulated parts. Investigators are examining whether the parts were ordered on the Internet, through the mail or obtained through other unregulated means.

Officer Andre Moye Jr. pulled Luther over and was preparing to impound his vehicle when authorities said the suspect reached for a rifle and opened fire. Moye, who had been with the department two years, was pronounced dead a short time later. Two other officers are recovering after being shot in the fight that ensued.

California has essentially banned assault-style weapons for three decades. As currently written, state law defines an assault weapon as a centerfire rifle that can accept a detachable magazine and includes features such as a pistol grip, a folding or telescoping stock and a threaded barrel. After mass shootings in 2018 in Florida and Nevada, state lawmakers also banned possession of magazines that can accept more than 10 rounds of ammunition, but the courts postponed enforcement pending the outcome of a lawsuit filed by gun rights advocates.

To circumvent the law, gun owners sometimes purchase parts, whether on the internet or in person, and then self-assemble semi-automatic assault-style weapons. Such weapons have been called "ghost guns" because they often lack serial numbers, though California has required a serial number on all guns since 2018.

In Santa Monica, Calif., in 2013, 23-year-old John Zawahri used a self-assembled AR-15-style gun to kill five people, firing about 100 rounds during the 13-minute rampage. He fired at passing cars, a bus, pedestrians and police before he was shot and killed by Santa Monica police. Authorities have said he had access to more than 1,300 rounds of ammunition.

The California Department of Justice had told Zawahri in a 2011 letter that he was ineligible to buy a firearm. After the 2013 shooting, police said Zawahri had been turned down because of bombmaking materials found in his home while he was a high school student and possible mental health issues.

Four years later, Kevin Janson Neal self-assembled two AR-15-type semi-automatic rifles with multi-round magazines and then went on a rampage in the Northern California farm town of Rancho Tehama Reserve.

Neal was killed by police 45 minutes after killing four people and injuring 10 others, including seven children. Investigators later discovered a fifth victim, Neal's wife, beneath the floorboards of their home.