SAN DIEGO - Four days after a man killed 51 people at two mosques in New Zealand, court documents show a San Diego college student expressed regret in a text message that he missed watching the livestream video of the attack and praised the shooter’s writings as “spot on with everything,” and something everyone should read.

Five days later, authorities say John T. Earnest set a mosque on fire in Escondido, north of San Diego, where seven people on a retreat were sleeping inside and escaped safely. A month later, they say Earnest opened fire during a Passover service on April 27, killing one woman and injuring three people, including the rabbi.

The details in search warrants released Wednesday give the clearest indication yet that Earnest was inspired by shooter Brenton Tarrant and acted on that hatred within days of the New Zealand killings. A California state judge ordered the 338 pages unsealed at the request of five news organizations, including The Associated Press.

Earnest, 19, has been charged in state and federal courts that make him eligible for the death penalty if convicted. He has pleaded not guilty.

Federal authorities had previously released excerpts of Earnest’s online writings demonstrating his affection for Tarrant, but the search warrants give a detailed timeline showing how quickly the New Zealand attack turned his violent thoughts into action.

On March 19, four days after the New Zealand massacre, Earnest sent a text message to a person, whose name was redacted from the documents, complaining none of the links to the livestream video of the massacre were working and added, “I could’ve seen it live damnit,” according to the search warrants.

He went on to talk about Tarrant’s writings, saying “I’ve only read a little but so far he’s spot on with everything.”

On March 20, investigators in the search documents said he sent another text about the writings saying, “I think it’s important that everyone should read it.”

On March 24, Earnest drove to a mosque in Escondido and doused it with gasoline and sparked a blaze that charred a wall, authorities said. The fire started at about 3:15 a.m. when seven people on a spiritual retreat were inside sleeping, according to investigators. They saw flames coming through the crack of one of the doors, grabbed water and quickly extinguished it.

On April 6, Earnest opened an Amazon account and used the online retailer to make purchases for his attack on the synagogue, according to court documents. He bought an ammunition holder worn across the chest, a military-style duffel bag, a “GoPro” camera, a tactical helmet and other items.

The day before the shooting, he bought a Smith & Wesson AR-15 rifle from a San Diego gun shop, according to federal charges. Officials have said he bought the gun legally under federal law.

California bars anyone from buying a rifle under the age of 21 unless the person is a member of the military or has a hunting license. According to the search warrants, authorities seized a hunting certificate from his family’s home, indicating Earnest may have obtained a hunting license to buy the weapon.

Earnest walked into the Chabad of Poway shortly before 11:30 a.m. on April 27 and shot several rounds before appearing to struggle to reload the gun, officials said.

An off-duty Border Patrol agent grabbed the handgun of a parishioner and fired at least four rounds as Earnest ran out the door. The agent later put the handgun into a black prayer bag, according to the warrants.

Earnest killed a 60-year-old woman and injured three others, including the rabbi and an 8-year-old girl.

Loading... Loading... Loading... Loading... Loading... Loading...

Shortly after the attack, Earnest called 911 and said he had shot up the synagogue and was willing to surrender, according to court documents. He then told authorities he had his weapon in his car, several rounds of ammunition and that he was parked outside a local barbecue restaurant.

Police arrived shortly after the call and arrested Earnest without incident.