The notorious Bronx serial bride apologized — to America — after a court appearance Wednesday, saying she could have “accidentally married a terrorist” and endangered the country.

“I apologize to the American people because I could have put them at risk,” Liana Barrientos, who wed 10 men over 11 years as part of a green-card scam, told The Post.

“I could have let people stay in this country who could have killed us,” the 40-year-old Barrientos lamented.

“This is what I get because of my own selfishness and not doing my homework. I would have to live with that for the rest of my life.”

The mom said her biggest regrets were “disappointing my kids and that I could have brought bad people here who could kill. I could have let people stay in this country who could have bombed [New York] or anywhere else. That’s f—ed up.”

Barrientos copped to a plea deal in July 2016 in exchange for up to 18 months in an outpatient program treating substance abuse and mental illness.

If she fails out of the program, she could face up to four years behind bars.

“It was a stupid moment,” she said. “The father of my child was in jail, and getting $5,000 to $10,000 for 10 minutes [getting married] was better than stripping or selling drugs.”

Her marriage spree began in 1999, and she managed to tie the knot with six men before her first husband, Mohamed Gebril, filed for divorce in 2002. She wed five times in 2002 alone, authorities said.

There were so many weddings that Barrientos had trouble remembering the names of all of her husbands.

“I don’t remember marrying any of the men except for [Vakhtang] Dzneladze and Salle [Keita],” she told investigators in April 2015, referencing her seventh and 10th husbands.

At the height of the scam, she was married to eight men at once and by 2010 had filed for marriage licenses in a number of New York counties — including Westchester, Nassau, Rockland and Suffolk — by using variations of her name.

A few of the men were even from “red-flagged” countries suspected of harboring terrorists, including Egypt, Mali, Turkey, Pakistan and Bangladesh.

Husband No. 8, Rashid Rajput, was shipped back to Pakistan in 2006 after allegedly making threats against the United States.

“He was quiet,” Barrientos said of Rajput on Wednesday. “I met him one or two times.

“I’ve learned my lesson, I would never do that again,” she added. “I can sleep good at night now. I have a clear conscience.”