The corruption case against former Nassau County Executive Edward Mangano ended in a mistrial Thursday afternoon.

Central Islip federal Judge Joan Azrack pulled the plug on the 12-week trial following receipt of a note from the jury that led to a closed-door meeting with lawyers on both sides​.

The move came on the ninth day of deliberations, and an earlier note on Wednesday in which the jury declared itself deadlocked.

“I have declared a mistrial in the case,” Azrack told the panel around 3:30 p.m.

“Your deliberations are over. You are free to go with our thanks for your hard work.”

Mangano’s wife and co-defendant, Linda Mangano, threw an arm around him as relatives in the gallery gasped and broke down in tears.

The couple then began hugging and weeping as the jurors filed out of the courtroom.

The Manganos are accused of accepting hundreds of thousands of dollars in bribes and kickbacks from a crooked restaurateur, Harendra Singh, in exchange for county contracts and government loan guarantees.

A co-defendant, former Oyster Bay Town Supervisor John Venditto, was acquitted of similar allegations last week.