SACRAMENTO, Calif. (AP) — Matthew Muller was sentenced to 40 years in federal prison for a kidnapping so elaborate and outlandish that investigators first thought his victims were carrying out a bizarre hoax.

The Harvard University-trained lawyer and former Marine who meticulously planned his attack was tripped up months later by a stupid mistake: He dropped his cellphone at a burglary scene.

Here’s how it all went down:

___

THE ATTACK AND THE VICTIMS

Denise Huskins and boyfriend Aaron Quinn told police they awoke about 3 a.m. March 23, 2015, in their Vallejo home northeast of San Francisco to find red targeting lasers shining in their eyes and shadowy figures at the foot of their bed whispering. Soon they were bound, blindfolded and drugged with a sleep-inducing liquid.

ADVERTISEMENT

When Quinn awakened hours later, he found himself surrounded by motion-sensing cameras. He recalled the kidnappers warning him they would know instantly if he moved beyond certain boundaries. He called police about 2 p.m.

Huskins, meanwhile, had been dumped into the trunk of first one car, then another. She awoke 160 miles away, at a cabin in South Lake Tahoe. Blindfolded and woozy, she spent two days there and said she was sexually assaulted twice by an assailant who set up cameras around the bed and made her perform as if she was a willing participant.

She was certain she was about to die, she testified at Mullen’s sentencing hearing. She later was driven nearly 500 miles and released in her hometown of Huntington Beach, near Los Angeles.

___

THE POLICE AND THE SUSPECTED HOAX

Vallejo police didn’t believe their story.

Quinn reported that the kidnappers had demanded $8,500 in ransom — a pittance, police thought, for such an elaborate abduction.

He’d waited nearly 12 hours to report the crime, and investigators found little physical evidence at the scene. Huskins, meanwhile, wasn’t cooperating with investigators after her release, and soon she and Quinn hired defense attorneys.

The case felt, police said, like it had been ripped from the pages of the book and movie “Gone Girl,” in which a woman goes missing and then when she reappears lies about being kidnapped.

___

“OCEAN’S ELEVEN” AND THE “GENTLEMAN CRIMINALS”

Huskins, Quinn and their families remain convinced that there was more than one abductor. But federal investigators say it was all an elaborate ruse by Muller, acting alone.

The gun pointed at the victims’ heads? A water pistol with a flashlight and laser pointer taped to it.

The other shadowy figure at the house? A blow-up mannequin dressed in military fatigues and rigged with bendable wires.

The whispering voices that the victims heard? A recording that Muller played from a device in his pocket.

During and after the kidnapping he sent anonymous emails to a San Francisco reporter purporting to be from “a sort of ‘Ocean’s Eleven’” band of sophisticated criminals who were practicing their kidnapping-for-ransom tactics.

ADVERTISEMENT

Muller told Huskins he was one of a group of “gentleman criminals” who would free her after they had their money.

“Gentleman criminals?” she said at Muller’s sentencing. “Lucky me.”

___

THE MARINES, HARVARD AND A SPIRAL INTO MENTAL ILLNESS

Muller served as a Marine from 1995 to 1999 and returned to his home state of California to earn a college degree summa cum laude before attending and working at Harvard Law School. But by his third year in law school his defense attorney says Muller was so paranoid that he thought he was being tracked by the government.

Attorney Thomas Johnson largely blames mental illness for his client’s downfall.

Muller’s law license was suspended in 2013 for failing to pay annual dues, and he was later disbarred for failing to file a green card application for a client’s son despite taking $1,250 in advance money.

Three months after the Vallejo kidnapping, Muller broke into a San Francisco Bay Area home. He awoke the adults “with a red laser beam and flashlight,” prosecutors say, and they were told to lay face down and “if they followed the burglar’s instructions, their daughter would be safe.”

The father fought back and Muller fled, but dropped his cellphone and zip ties when he ran out.

Investigators tracked the phone to Muller and found plenty of evidence linking him to Huskins’ abduction — including videotapes of the sexual assaults.

___

“YOU WILL NEVER HAVE CLOSURE”

Huskins and Quinn now have new jobs and live in a different city.

El Dorado County Assistant District Attorney James Clinchard said his office will consider filing new state charges against Muller after learning after the sentencing Thursday that authorities recovered a video of the sexual assaults.

Vallejo police issued an apology after Muller’s arrest but Huskins is suing the city and two police officers, accusing them of defamation and inflicting emotional distress. Her civil lawsuit is pending before U.S. District Judge Troy Nunley, the same judge who sentenced Muller on Thursday.

“You will never have closure,” Nunley told Muller’s two victims, who hugged during their tearful testimony.

“It will be there, but what I see from the two of you is you’re going down a path of healing,” the judge said. “But you’re going to be OK, because the strongest thing you have is each other.”