A Queens couple that tried for years to get pregnant suffered the mother of all mix-ups once they finally succeeded — giving birth to someone else’s babies, thanks to a bungling Los Angeles fertility clinic, a stunning new lawsuit claims.

Married in 2012, the Asian husband and wife — identified in court papers only as Y.Z. and A.P. — turned to CHA Fertility Center, when their countless attempts, both natural and with artificial insemination, failed.

Run by Dr. Joshua Berger and co-owner Simon Hong, the clinic boasts that it’s a “mecca of reproductive medicine” that has “fulfilled the dreams of tens of thousands of aspiring parents from Southern California and beyond in over 22 countries.”

With hope in mind, the Flushing couple made the trip West in January 2018 to meet with Berger and Hong, and eventually underwent a months-long regimen of medicines, vitamins, tests and procedures that yielded eight embryos.

In all, they spent $100,000 on facility, specialist and doctors fees, medication, lab expenses and travel costs, the couple claimed.

In July 2018, A.P. attempted to have an embryo implanted at the Los Angeles facility, but it didn’t work, the couple said in its Brooklyn federal court lawsuit.

A month later, they were ready to try again, and CHA thawed two of the couple’s female embryos for another attempt.

By September, A.P. was pregnant.

The two “were ecstatic to learn that after years of trying to conceive, they had success and were pregnant with twins,” according to court papers.

But subsequent sonograms showed something wasn’t right.

Ultrasound technicians kept telling the couple that A.P. was carrying twin boys, prompting the “confused” pair to call CHA to find out why.

Berger and Hong dismissed the sonograms, pooh-poohing them as “not a definitive test,” according to the suit.

Berger even regaled the prospective parents with a tale of his own wife’s pregnancy, noting that they were originally told that his wife was carrying a boy, only to have her give birth to a girl.

The doctor and clinic owner “assured [A.P. and Y.Z.] that they were having girls and that nothing was wrong.”

On March 30, 2019, A.P. went to a New York hospital. The next day, she gave birth via a cesarean section.

Both babies were boys — and neither shared Y.Z. and A.P.’s Asian ethnicity, the couple charges.

CHA personnel, including Hong, flew to New York to conduct genetic tests that confirmed the newborns weren’t genetically related to Y.Z. and A.P.

“The testing also confirmed that the two male babies were not genetically related to each other,” the couple alleges.

Y.Z. and A.P. were then forced to give custody of each infant to their respective biological parents, who were also clients of CHA.

Heartbroken and embarrassed, Y.Z. and A.P. haven’t told most of their friends and relatives about the “unimaginable mishap.”

The couple “could not find the courage and the way to tell others about their devastating loss,” they claim.

Mistakes at fertility clinics are not unheard of. In April, a couple sued a Connecticut fertility clinic that allegedly implanted the wrong embryo, giving them a son of a different race than his parents.

The now-shuttered CT Fertility was supposed to use the husband’s sperm and donor eggs. The family used CT Fertility successfully for their first born in 2016. But when they returned to use their frozen embryos for a second child, they wound up with a child who didn’t look like his brother and had “much darker skin pigmentation than either the father, genetic mother or their first son,” according to reports.

In 2009, an Ohio couple that had struggled with miscarriages was thrilled to learn they had become pregnant via in-vitro fertilization.

But days after Carolyn Savage found out that she had conceived, she and her husband, Sean, learned that a paperwork error had mixed up their records with those of another couple, and that the baby she was carrying wasn’t theirs.

The Savages gave birth to a boy and handed over the baby to his biological parents. Both couples wrote books about their experiences.

For A.P. and Y.Z., the experience of delivering the babies and then losing them has left the couple with “permanent emotional injuries from which they will not recover,” they said in their legal claim.

They do not know what happened to the two female embryos that were supposed to have been implanted in A.P.’s uterus. They called them “irreplaceable.”

The couple “may never know what happened to their embryos, as well as whether the currently cryopreserved embryos are genetically matched to them,” they said in court papers seeking unspecified damages.

A lawyer for the couple declined comment. CHA did not return a request for comment.

Court papers don’t detail the reactions of the parents whose babies A.P. carried to term as an unwitting surrogate.

The two families should be spared any genetic concerns, said Dr. Amber Samuel, a specialist with the Society for Maternal-Fetal Medicine.

But multiple factors, including whether the gestational carrier smokes or drinks or is of a certain age, can influence a pregnancy, she said.

“Most likely, the babies are going to be fine. The good thing about it is that she was a mom who super wanted children,” Samuel said, noting that such patients “tend to be more disciplined.”

If the pregnancy had been carried out by a typical surrogate, the biological parents would have overseen every step of the process and the surrogate would have been compensated, the doctor pointed out.

The case represents a shocking breakdown in protocol, Samuel said.

“There are all sorts of checks and balances for this not happening, so there’s a real breakdown there,” she said. “Someone was super asleep at the wheel.”