Motherless Brooklyn” opens in theaters Friday, spinning an intricate tale of power and graft in mid-century New York.

Behind the scenes, the Edward Norton film has been the focus of another tangled story involving allegations of government misconduct. The story centers on Lt. Michael Davidson, a New York City firefighter who died of smoke inhalation while trying to extinguish a blaze on the set of the film in March 2018.

The production was shooting in the former St. Nick’s Pub, a Harlem jazz venue that shuttered in 2011. An official FDNY report blamed the fire on a faulty boiler in the cellar, one floor below the film set. But on Sept. 16, Scott Specht, a fire marshal assigned to the case, filed a lawsuit alleging that the film company was likely to blame.

Specht claims that he was taken off the case because he would not agree to pin the fire on the boiler. He says the incident ruined his career within the department, ultimately forcing him to take an early retirement.

The FDNY referred comment on the suit to the city’s Law Department, which handles litigation. “These claims have not been substantiated,” said a Law Department spokesman. “We’ll know more as we proceed with the case.”

Norton’s production company, Class 5 Inc., is defending itself from four other lawsuits filed by tenants in the building and the fireman’s widow. Class 5 has also filed its own cross-complaint against Vincent Lampkin, the building’s owner, accusing him of failing to maintain the boiler and the sprinkler system.

“The production is not to blame for either the death of Lt. Davidson or the cause of the fire,” a Class 5 rep said in a statement to Variety.

Lampkin, who is also being sued by his tenants and the widow, issued a blanket denial and filed his own cross-complaint against Class 5, alleging that the film company should be responsible for any liabilities.

St. Nick’s Pub operated for nearly 50 years on the basement floor of 773 St. Nicholas Ave., a brownstone built in 1895. According to Class 5’s suit, the production scouted several historic locations before settling on St. Nick’s, which had been vacant at that point for six years.

The production says that Lampkin never told them that the building did not have a functioning sprinkler system or smoke detectors, and that he had been cited for numerous code violations having to do with the boiler and the electrical system.

To restore the bar to its period look, the production covered the basement walls and windows in plywood panels, which were coated in polyurethane. The production began working in the building on Feb. 14, 2018. On the night of March 21, the crew saw Lampkin go down to the cellar — one level below the set — to fix the boiler, which was not supplying heat to the building, according to Class 5’s lawsuit.

The fire broke out the following night. According to the FDNY report, the department received the call just before 11 p.m. Davidson was among a group of firefighters who went down to the cellar to fight the blaze. About 15 minutes later, he began to run out of air. As he was preparing to leave the cellar, the fire erupted one floor above — sending black smoke billowing from the void space between the wall and the movie set paneling.

As conditions deteriorated, the commanders on scene ordered the firefighters to evacuate. Davidson was able to climb the stairs up from the cellar, but encountered the high heat and smoke. He collapsed and lost consciousness. In the confusion and difficult conditions, it took about 18 minutes for the other firefighters to realize that Davidson was missing and locate him inside the building. He was put in an ambulance and taken to Harlem Hospital, where he was pronounced dead at 12:16 a.m.

The FDNY report identified the cause of the blaze as a defective boiler flue pipe in the cellar. But the report also noted that the film crew had used combustible paneling, which was cited as a contributing factor in Davidson’s death.

“The movie set production placed highly combustible materials on the walls throughout the first floor,” the report states. “These movie set walls created voids which initially concealed fire.”

In response, the production company said that the set dressing was made of “commonly used household materials, available at most home goods stores.” None of it required any special permitting, the company said.

“The FDNY granted all appropriate permitting and made multiple visits to the set including the day before the fire,” the company said. The company added that the crew was not responsible for the boiler. The crew also supplied electricity from generators, rather than use the building’s electrical system.

After the fire, Specht and his partner were assigned to investigate and determine the cause. Specht says he identified two possibilities: the boiler or the electrical system, which he believed could have been damaged by the construction of the film set. Contrary to the final report, Specht says he came to believe the fire started on the movie set level — not in the cellar, where the boiler was.

He informed his supervisors that his “primary theory” was that the film production was to blame, according to his suit. He alleges that his bosses called him to a meeting on April 13, where they pressured him to sign off on a report blaming the boiler flue. After they “browbeat, insulted, abused, and threatened” him, according to the suit, he agreed to blame the boiler. However, he later had a change of heart, and was subsequently taken off the case.

Class 5, in its cross-complaint, offered a different version of events, saying that Specht “voluntarily removed himself after reaching the conclusion he was not qualified to address and lead the investigation.” Class 5 also stated that Specht “did not disagree” with the FDNY conclusion that the boiler flue had caused the fire.

Specht states he did not reach a final conclusion either way, and wanted investigators from the Bureau of Alcohol, Tobacco and Firearms to examine the boiler. That never happened. His suit alleges that the FDNY bowed to pressure to support the film industry.

“The City of New York and its officers have important political, financial, personal, and cultural relationships with the movie and television production businesses that would be significantly damaged in the event that the producers and directors of ‘Motherless Brooklyn’ were seen as being responsible, in whole or in part, for a major fire that killed an FDNY firefighter and destroyed a multiple dwelling apartment building in Manhattan,” Specht’s lawsuit states.

Specht complained to the city’s Department of Investigation and the D.A.’s office, and filed a claim with the city controller. Specht claims he was told he was committing “career suicide” by defying his supervisors.

After being taken off the case, he says he was reassigned to administrative duty. Rather than continue to undergo “humiliation and isolation,” he put in for retirement. His suit alleges retaliation, and seeks lost compensation as well as punitive damages, costs and attorneys’ fees.