SAN DIEGO (AP) - A 19-year-old nursing student accused of opening fire at a California synagogue didn’t have a valid hunting license, which is the only way someone under 21 who isn’t in the military or law enforcement can legally buy a weapon under state law.

The California Fish and Wildlife Department said Wednesday that John T. Earnest was issued a hunting license, but it had not gone into effect yet.

It’s unclear how Earnest bought the gun. The hunting license was not set to go into effect until July 1, said California Fish and Wildlife Department spokesman Peter Tier.

Authorities say Earnest opened fire on April 27 at the Chabad of Poway, killing a 60-year-old woman and injuring three others, including the rabbi and an 8-year-old girl. He picked up the weapon the day before from a San Diego store, according to court records.

San Diego District Attorney Summer Stephan said it is believed Earnest bought the weapon legally but has not provided details on how or when that occurred.

Earnest picked up his AR-15 rifle from a San Diego gun store the day before the shooting, according to investigators. Earnest paid $963.41 to San Diego Guns for the rifle. The store has declined to comment when contacted by reporters.

The story was first reported by ABC’s San Diego affiliate, KGTV.

California bars anyone from buying a rifle under the age of 21 unless the person has a hunting license, is a member of the military or law enforcement. Former Gov. Jerry Brown signed the legislation in response to the shooting at a high school in Parkland, Florida, where a 19-year-old gunman killed 17 people.

California hunting licenses run on the state’s fiscal year and do not go into effect each year until July 1, Tier said, though they can be obtained ahead of time so hunters can enroll in competitions and prove they will be licensed in time for such events.

The licenses have dates printed on them showing when they go into effect, he said. Earnest’s license would have stated it went into effect July 1 and was valid through June 30, 2020.

Recently unsealed search warrants showed police found a hunting certificate at Earnest’s home proving he completed his coursework and had passed a test.

Before a hunting license can be purchased, an applicant must receive a minimum of 10 hours of training from a state approved instructor. Six of those hours can be done online, Tier said. The certificates differ in look from licenses.

State Sen. Anthony Portantino, who authored the state gun law that took effect this year, said in a statement that he is working to close the loophole.

The Democrat said he wants the law amended to prohibit the sale of semi-automatic weapons to anyone under the age of 21.

Earnest, who voiced anti-Semitic and white supremacy beliefs online, has been charged in state and federal courts in the synagogue shooting. He is eligible for the death penalty if convicted. He has pleaded not guilty to murder and attempted murder.

He fired off 10 rounds before fumbling while trying to reload the weapon, according to investigators. An off-duty Border Patrol agent who is a member of the synagogue grabbed a fellow worshipper’s handgun and fired off four rounds, causing the shooter to flee. Earnest later called 911 and said he had just shot up a synagogue. Police arrested him without incident.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC.