The heartsick Manhattan ad exec whose parents and three young daughters were killed in a Christmas 2011 blaze says Connecticut building officials ghoulishly rushed to tear down the charred house in a desperate bid to cover up multiple permit violations — and to profit from the sale of valuable salvaged building materials.

Madonna Badger claims in court papers that Stamford’s chief building official, Robert DeMarco, and his city operations boss, Ernest Orgera, had an “ulterior motive” when they “intentionally and recklessly” ordered the demolition of the $1.7 million waterfront home just a day after the blaze.

In her New Haven federal court suit, Badger alleges that DeMarco knew he’d be called out for “multiple failings of the building department” related to permits and inspections on her home renovation — including granting permits to unlicensed contractor Michael Borcina, who had been Badger’s boyfriend at the time of the fire, to do the work.

DeMarco and Orgera also knew they were sitting on a potential scrap-metal gold mine at the under-construction house, which contained “numerous types of salvageable scrap metal” including wiring, steel beams, aluminum, copper and even Badger’s personal silver flatware and jewelry, the suit alleges.

Orgera, Badger notes in the suit, was identified in a Stamford city law-department report as a person “running metals.” In 2011, Stamford police and the state’s attorney investigated Orgera for allegedly stealing city scrap metal. He is also accused in an ongoing federal case of selling scrap metal and allegedly pocketing the profits to pay for parties, records show.

And Badger claims DeMarco ignored city law by failing to consult her before he ordered the remains of her house torn down. Instead, he submitted “a perjurious notarized affidavit stating that the owner authorized the demolition,” the suit alleges.

A demolition permission form in the filing shows someone else filled in Madonna Badger’s name. The order, which DeMarco didn’t sign until Jan. 10, also shows the tear-down was scheduled for Dec. 28.

But the house came down at noon on Dec. 26 — barely 24 hours after the raging pre-dawn fire that killed Badger’s girls, Lily, 9 and twins Sarah and Grace, 7, and her parents, Pauline and Lomer Johnson.

In another, a rescue-crewmember reveals his unit “came to within a few feet of reaching victims” before the flames became too dangerous to proceed.

Badger’s suit against DeMarco, Orgera and the City of Stamford seeks unspecified damages and a jury trial. All parties declined comment.

Badger’s suit maintains there were nearly a dozen battery-powered, operational smoke detectors in the home, along with fire extinguishers and a hard-wired fire-safety system that had been deemed operational.