A Long Island woman plotted a hit on her former mother-in-law and her ex-husband’s 5-year-old stepdaughter in a bizarre bid to get back together with him, Suffolk County prosecutors said Tuesday.

Elsy Rodriguez Garcia, 25, was jealous of her ex-hubby spending time with his mom and a daughter from a previous relationship — so she schemed to have both of them murdered, hoping the man would come back to her and their 2-year-old son, according to an indictment unsealed in Suffolk County court.

“Her plan was to have them killed in what would appear to be a robbery,” Suffolk County Police Commissioner Geraldine Hart said in a press conference following Rodriguez Garcia’s arraignment on two counts of attempted first-degree murder and two counts of second-degree conspiracy.

“Rodriguez Garcia, who has a son with her ex-husband, believed if the man’s mother and daughter were killed, the man would pay more attention to their son and it would bring the family back together.”

The pair divorced four months ago, officials said.

“The irony is that the defendant hatched this murder plot in an attempt to get her ex-husband to spend more time with her, as a direct result, she’s now facing up to life in prison,” said Suffolk County DA Timothy Sini.

The indictment comes just weeks after another Long Island woman, NYPD Officer Valerie Cincinelli, was arrested for allegedly trying to hire a killer to rub out her estranged husband and her boyfriend’s daughter.

Rodriguez Garcia, who works at a pediatrician’s office in Huntington, contacted a co-conspirator via the WhatsApp messenger and asked that person to hire a hit man to knock off the granny and child while they were in Ecuador, prosecutors said.

Rodriguez Garcia allegedly provided photos of the targets, along with descriptions of where she thought they were staying.

“What’s even more disturbing is that the photograph she sent of the little girl was of the child’s kindergarten graduation,” Sini said.

But the ex-husband dropped a dime on her after learning from a relative that Rodriguez Garcia was cooking up the hit.

Police set up a sting in which they sent Rodriguez Garcia a doctored photo that appeared to show the mother-in-law and stepdaughter dead — at which point she allegedly offered to pay the hit man $6,000, officials said. She was arrested the next day on July 13.

Rodriguez Garcia, a US citizen originally from Ecuador, was ordered held on $750,000 cash or bond, and was issued a restraining order to stay away from the granny and 5-year-old.

Her lawyer William Ferro argued that “she’s not capable of committing a crime of this magnitude.”