San Diego  Three years ago, a pipe bomb in a backpack exploded outside the federal courthouse in downtown San Diego, shattering the glass doors and blowing out a window a block away.

No one was injured that early Sunday morning on May 4, and while federal authorities charged a trio of suspects and secured guilty pleas soon after, one question has lingered: What was the motive behind the blast?

Now, prosecutors with the U.S. Attorney’s Office in San Diego have sketched out an answer. In court papers filed recently, they outline a bizarre scheme orchestrated by a former San Diego city worker named Donny Love.

They said Love, 44, plotted the bombing, recruited accomplices to carry it out and then planned to give information on the incident to authorities so he could collect a large reward and win leniency for previous crimes.

Love was about to lose his job with the city’s water department at the time, prosecutors Fred Sheppard and Shane Harrigan wrote in an April 26 pretrial court filing. He was $26,000 behind on the mortgage of a home in Menifee in Riverside County and facing prison time after pleading guilty to drug charges and forgery for stealing customers’ payment checks from the water department.

Love has pleaded not guilty to 10 charges related to the bombing, including conspiracy to use a weapon of mass destruction, possession of a destructive device, witness tampering and obstruction of justice. His trial is scheduled for May 23, and he faces at least 30 years in prison if convicted of the weapons charges.

His legal team’s strategy will be, in part, to undermine the three accomplices who have pleaded guilty and are expected to be witnesses against him. His attorneys will likely accuse them of turning against him out of spite and to get reduced sentences.

But prosecutors said Love was the “mastermind and driving force” behind the explosion. “He cooked all this up to help himself out,” Harrigan said at a pretrial hearing Tuesday.

The court filings provide the first public look into what federal authorities believe is the motive. Prosecutors have been tight-lipped since arresting Rachel Carlock, Ella Louise “Weezy” Sanders and Eric Robinson — the three accomplices — in 2008, and then Love last year.

Prosecutors said Sanders and Love were longtime friends, and that Carlock had been Love’s girlfriend since 2002 in an on-again, off-again relationship that was at times abusive. All three lived with Love at the home in Menifee.

Prosecutors said Love hatched the bombing plot in early 2008. At one point, he allegedly asked Sanders to test the glass at various courthouses in San Diego to see which ones were reinforced and which were not. He did other research: At his home, investigators found a printout from Answers.com on how to build pipe bombs and a book titled, “Whoosh Boom Splat: The Garage Warrior’s Guide to Building Projectile Shooters.”

On May 4, 2008, Carlock loaded three pipe bombs carefully taped together into a backpack with a jar of nails at Love’s home, prosecutors wrote. Sanders helped, and Robinson drove her to the courthouse, where the bombs exploded just after 1:40 a.m.