Jillian McCabe had been researching how to kill her 6-year-old autistic son — and get away with it — before she took him to Oregon’s Yaquina Bay Bridge, told him she was “sorry” and pushed him over the side, prosecutors said.

Lincoln County District Attorney Michelle Branam said this week that the investigation uncovered online search terms for “stabbing, drowning and dropping from a 133-foot fall.”

McCabe also searched “hearing voices and hallucinations,” “insanity defense” and looked up Andrea Yates, who drowned her five children in 2001 and was found not guilty by reason of insanity, according to court documents.

Then, she told police, she wrote a letter to her husband.

“You said I was an obligation and London was a burden. I want to give you a gift of taking the two away,” she wrote. “The voices said that you need this, you need a new fresh start and I can give it to you. You will be sad for a while, but in the end you will be better off.

“You will be free!”

McCabe, 36, from Newport, pleaded guilty and was sentenced Monday to life in prison.

“Everyone hopes this can be explained by way of mental illness so we don’t have to leave open the possibility that a mother could plan to so horrifically murder their child,” Branam, the prosecutor, said in a statement. “But it appears from the evidence we have in this case that this was exactly what happened.”

McCabe will not be eligible for parole for 25 years.

An attorney for McCabe could not immediately be reached for comment.

One November night in 2014, family members had said, McCabe snapped.

Prosecutors said McCabe parked her car at the end of the bridge in Newport, about 130 miles from Portland, took her son’s hand and led him to the center.

A police officer said at the time he saw a woman matching her description carrying a boy and thought it was strange because the child was “too big to be carried,” according to court documents.

“Jillian reports that she lifted London to throw him over but changed her mind, put him down, turned and walked back to the car,” according to the prosecutor’s statement. “Instead of returning to the car, she lifted him again and pushed him over the bridge.

“She said she did not look back but heard the splash.”

Then, almost immediately, McCabe dialed 911.

“I just threw my son over the Yaquina Bay Bridge,” she told the dispatcher, according to court documents.

After an hours-long search in two boats and a helicopter, authorities found the boy’s body floating in the bay.

Branam, the prosecutor, said it wasn’t the fall that killed him.

“He suffered broken bones from the impact of the fall and ultimately drowned,” she said.

Branam added: “She talks with detectives for hours and explains that she understands that she will going to prison. She says  now her husband, Matt McCabe, will be free of her and London. She said Matt thought of her as a burden and London as an obligation, but now he will be free.”

Following London’s death, family members had spoken out about McCabe’s struggles.

Some said she had been having a hard time caring for her autistic son and sick husband. Some said she had tried to raise money for them online. Some said she had talked about “pulling a ‘Thelma and Louise.'”

At one point, a family member set up a crowdfunding campaign on YouCaring.com, asking for $50,000 to help McCabe care for her autistic son, London, and her husband, Matt, who had been diagnosed with multiple sclerosis.

“If you are a praying person, pray for us,” McCabe wrote online. “I love my husband and he has taken care of myself and my son for years and years and now it’s time for me to take the helm. I am scared and I am reaching out.”

McCabe also posted videos on YouTube.

One seemed to show her husband in a hospital bed as her son played with the controls used to move it up and down.

Another showed the boy sitting in a hammock. When McCabe asked whether he was happy, he didn’t respond. Then when she told him to say “help” if he wanted her to rock the hammock, he said: “Help.”

“At first blush, the case appears to be a tragic story of a mentally ill mother who snapped,” Branam, the prosecutor, said in a statement. She added that McCabe was “very calculated in her planning of this homicide.”

London had been diagnosed with autism in March 2011 and some two years later in 2013, Matt McCabe was diagnosed with a tumor and lesion on his brain stem, prosecutors said.

The next year, prosecutors said, Jillian McCabe threatened to attempt suicide at least twice and was voluntarily admitted to mental hospitals. She was evaluated and released both times.

“When it suits her, she can fabricate the symptoms,” Branam said in a statement, according to NBC News. “When she hears that she may be restricted from something she may want, she turns off the symptoms.”

Prior to her son’s death, McCabe had searched on Google “mother who stabs child,” “drowning own child” and “threw child off bridge,” according to court documents.

In one letter, McCabe talked about how she planned to do it.

“I study the bridges as I drive over them,” she wrote. “I know where I would push London off.”

“Tomorrow I will do it,” she added. “I will get London up and take him to the bridge and I will throw him in the water. Then these damn voices will stop. I will go away — everyone will hate me, but I am hated anyway.”

Matt McCabe, who filed for divorce after his son’s death, told reporters he has not found closure.

“I can’t say enough about this boy,” he said Tuesday, according to the Associated Press. “He was my pride and joy. He was the center of my attention; his loss leaves a black hole in the center of my life.

“If you know an autistic individual, he needs love, too. Maybe more than you and I.”

[The story has been updated.]