New legislation is aimed at closing a legal loophole blamed for the proliferation of untraceable, homemade guns in Southern California.

So-called ghost guns cannot be tracked, allowing some to fall into the hands of criminals. They can be purchased online, delivered in pieces and assembled at home -- no background check required.

"We have to make sure that our laws are advancing as our technology advance in this country," said Assemblyman Mike Gipson, who represents the Compton area.

His bill, AB 879, would require a state background check for people seeking to buy firearm frames and receivers. It requires the Justice Department to electronically approved the purchase of firearm parts through a parts vendor.

Gipson said only licensed dealers should be allowed to sell the parts, which would allow them to be tracked by law enforcement agencies.

"I keep hearing this rhetoric about the Second Amendment," Gipson said. "We're not trying to take guns away from law abiding citizens. But it's the ones who are not law abiding citizens or who are prohibited from having such guns, we want to restrict their access from having guns."

The Bureau of Alcohol, Tobacco, Firearms and Explosives in Los Angeles estimates that 30 percent of the guns confiscated on Southern California streets are unserialized ghost guns. A haul last year netted nearly 50 ghost guns from just one bust of a gang in Hollywood.

NBC4 reached out to the National Rifle Associated for comment on the legislation, but did not receive a response.

A spokesman for the Office of Gov. Gavin Newsom said the bill would be evaluated on its merits if it reaches his desk for approval.