In the spring of 2012, U.S. homebuilders were celebrating a string of victories. In more than a dozen state capitals from Phoenix to Tallahassee, they had managed to block plans to require fire sprinklers in new homes.

Then came a threat from a place they thought was buttoned up: South Carolina.

It happened hours into a marathon session of the obscure council that sets state building codes. Some of the 15 council members who had gathered at the firefighters academy in the woods outside the state capital of Columbia already left for home. Late into the night, the state’s fire marshal, Adolf Zubia, somehow persuaded a majority of those remaining to support sprinklers by a vote of 6-3.

Zubia hadn’t really expected to prevail. Just as surprised was a spectator in the front row — Mark Nix, head of the state homebuilders association. The vote posed a threat to his industry. Adding sprinklers could cost builders thousands of dollars per home. California and Maryland already required residential sprinkler systems, but if South Carolina fell, other more conservative states might follow.

State by State From New York to Minnesota, see how homebuilders headed off mandatory fire sprinklers with help from friendly legislators. Read more. Email Updates Sign up to get ProPublica’s major investigations delivered to your inbox.

Nix locked eyes with the fire marshal at the council table. According to Zubia, Nix mouthed a warning: “You. Are. Fucked.”

While Nix denies saying that, Zubia instantly found himself in hot water. Before the meeting even adjourned, his phone buzzed with a text. He was to report to the office of Gov. Nikki Haley first thing in the morning.

There, Zubia says he was pushed to resign, the second state fire marshal forced out by the governor after advocating for sprinklers. And, soon, the code council reversed its decision.

Over the last eight years, U.S. homebuilders have spent millions of dollars on an extraordinary effort to block a safety improvement that the writers of the nation’s model building codes adamantly insist will save lives. The industry’s campaign, conducted far from the spotlight of Washington, shows how a well-financed lobby can shape state politics in public and behind the scenes.

The battle over sprinklers has consequences beyond politics. While house fires have become less common, thanks to smoke detectors and other improvements, modern construction techniques can make new homes more vulnerable to flames than older ones. There is no reliable central source of national data on house fires, but a ProPublica review of state records found two people who died and dozens who were injured in fires involving homes built without sprinklers since the beginning of 2009, after they became a nationally recommended standard.

To date, industry groups have helped foil efforts to make sprinkler systems mandatory in at least 25 states. That includes New York, where last year a two-year-old girl died in a blaze that fire officials said could have been stopped by sprinklers, and Texas, where the legislature’s ban was retroactive, overturning at least one city’s plan. New Jersey Gov. Chris Christie twice blocked sprinkler rules passed by the legislature. In Minnesota, builders got the state’s code change reversed in court on a technicality.

A close look at the fight over sprinklers in South Carolina — according to government records, emails and dozens of interviews — offers an unusually well-documented portrait of how lobbyists can get their way in state capitals.

Along with cultivating allies in the legislature through hundreds of thousands of dollars in campaign contributions, the Home Builders Association of South Carolina has relied on a close relationship with the governor. Haley, a rising Republican star who early this election season appeared on lists of possible vice-presidential candidates, was backed by the builders in her campaigns for the state legislature and the governor’s mansion.

With Haley’s help, the homebuilders gained sway over the South Carolina Building Codes Council, the prime decision-maker on rules governing the safety of homes and other buildings. The council is supposed to be an independent body balanced among multiple stakeholders, but Haley helped pack it with industry-friendly members, records and emails show.

In vetting council appointments, Haley’s aides effectively gave veto power to Nix, the head of the builders’ lobby. In one exchange, a Haley aide checked names with Nix, who wrote back, “Hey buddy… All three guys are good with us.” Haley filled the council seat set aside for a disabled person with a man who was given a house by the trade group as a charitable donation.

Haley’s spokeswoman, Chaney Adams, said that the governor doesn’t back mandatory sprinklers because she wants “South Carolina families to decide what works best in their homes” and that her appointees “are all qualified candidates who the governor feels will protect the safety and welfare of the public while, at the same time, defending consumer choice.”

The builders lobby wasn’t shy about touting the impact of donations from its political action committee and other tactics. Celebrating a crucial vote on sprinklers in the legislature, the group later distributed a video message to its 3,000 members.

“We were majority against us when we started,” Edward Yandle, one of the group’s board members, said in the video. “With the PAC money, and the ability to get in front of these guys, we won a battle we weren’t supposed to win.”

Nix said that his association has no special influence over Haley’s administration or the legislature. He added that his group’s victories help create jobs and keep housing affordable in South Carolina.

Edward Yandle, a top official with the trade association representing South Carolina homebuilders, says his group’s campaign contributions helped kill the sprinkler requirement: “With the PAC money, and the ability to get in front of these guys, we won a battle we weren’t supposed to win.” (Video from YouTube)

Sprinklers have been commonplace in commercial buildings since the 1950s and in hotels and apartment buildings since the 1990s. Whether they should also be mandatory in new single-family homes and duplexes has been debated for decades, pitting fire departments, sprinkler makers and scientists against builders. The industry’s position has been to leave the decision (and the bill) to homebuyers who want the safety feature, rather than making sprinklers standard in all homes.

Until recent years, declining numbers of deaths and injuries from U.S. home fires — thanks, in part, to codes requiring residential smoke detectors — blunted the urgency of the argument for sprinklers. In 1980, fires in single-family homes and duplexes caused an estimated 4,175 deaths, not including firefighters, and 16,100 injuries; by 2006, the toll had dropped to 2,155 deaths and 8,800 injuries.

But those reductions have stalled in the last decade, amid rising evidence that newer homes are built in ways that make fires burn more intensely.

Composite wood beams and other elements that make construction faster and cheaper make homes more vulnerable. Open floor plans remove walls and doors that can slow the spread of a fire and limit its oxygen supply. People in the 1970s typically had about 17 minutes on average to get out before what firefighters call “flashover” — the moment a room gets so hot everything in it combusts.

“Today that’s down to three or four,” said John Drengenberg, an engineer at Underwriters Laboratories, a safety consulting company that performs controlled burns to study how fire spreads.

Such evidence prompted the members of the International Code Council, a Washington-based nonprofit, to include residential sprinklers in their minimum safety recommendations starting in 2009.

At about a couple of dollars per square foot, sprinkler systems add $4,000 to $5,000 to the cost of the average house — roughly as much as granite kitchen countertops, proponents say. Homeowners can recoup some of that by paying less for insurance; State Farm, for example, offers up to a 10 percent discount on premiums.

Still, builders contend that requiring sprinklers in all new homes would be enough to price out thousands of potential buyers and squeeze an industry still recovering from the housing bust.

“Everybody wants safe homes,” said Gerald Howard, head of the National Association of Home Builders, which is based in Washington, represents more than 140,000 members and spends millions each year on campaign donations and lobbying. “Everybody also wants affordable housing. I don’t see the cost effectiveness being there for fire sprinklers.”

No independent national studies have definitively calculated how much safer a sprinkler system makes a home. A 2013 review by the National Fire Protection Association found the death rate in homes with sprinklers was 82 percent lower. The group based its projections on four years of fire data collected by the federal government, but its findings were still only estimates because many local jurisdictions don’t report their incidents. The group receives funding from sprinkler manufacturers.

While the homebuilders have fended off rules in almost all the states, dozens of cities have decided to go it alone and add sprinklers to their own building codes. A few did so long before 2009, and their safety records often are cited by sprinkler advocates.

Scottsdale, Ariz., a fast-growing city that had a population of 230,000 in 2014, imposed the mandate in 1986. In a 2001 report, the city said its rate of fire deaths had dropped faster than the nation’s and credited sprinklers with saving 13 lives. The devices also cut the cost of fire damage to an average of about $3,500 for structures with sprinklers, compared with $45,000 for structures without them. Requiring sprinklers didn’t slow home building, the city found, and Scottsdale’s population growth outpaced the state average.

Prince George’s County, a Washington, D.C., suburb, imposed the rule in 1992. There have been no fire deaths in homes with sprinklers since, while at least 55 people died in fires in one- and two-family homes without them, according to Mark Brady, a spokesman for the county fire department.

Howard, of the national builders group, said results from any single community should be taken “with a grain of salt” because infrastructure and construction methods vary from place to place, affecting both fires and the costs of preventing them. Without more comprehensive studies, the safety benefits of sprinklers remain unproven, he said.

No organization tracks all house fires or records the age of buildings that burn. But using data compiled by the U.S. Fire Administration, county records and information from the real estate website Zillow, ProPublica identified 37 fires that caused injuries in homes built since 2009 in seven states where the sprinkler mandate has been blocked.

Those fires resulted in two deaths: In May 2015, two-year-old Nora Lamirande died in a fire that raced through a newly built home in Van Buren, N.Y., while in College Station, Texas, a 48-year-old woman was found dead along with her two Rottweilers from smoke inhalation inside a new house. Among the dozens of people injured in such blazes was at least one in South Carolina: Reginald Wright of Anderson, who lost his job as a forklift operator after he suffered severe burns trying to extinguish flames that broke out in May 2015 in the new house he rented.

Since the 2008 decision by the international commission, roughly 4 million single-family homes and duplexes have been constructed in the U.S., most without sprinklers. These homes will likely never have sprinklers, because retrofitting is so much more expensive than including them in the original construction.

There’s no way to precisely measure the potential danger, but the delay worries many fire officials — even Zubia’s successor as South Carolina fire marshal, Shane Ray, who didn’t push for a sprinkler requirement while in office.

“If you were building 1,000 houses a year, and it takes five years to get this, there’s 5,000 houses that don’t have that protection,” said Ray, who after leaving the South Carolina job in 2014 became president of the National Fire Sprinkler Association. “As the fire chief I had to drive past those houses, I had to go into those houses on medical emergencies and I knew that some day there could be an event there that could cost somebody their life. That’s where this strategy of kicking the can down the road leaves us.”

When South Carolina’s code council took up residential sprinklers in 2009, the national battle lines already were drawn.

The previous September, builders and firefighters had debated angrily at the annual meeting of the International Code Council in Minneapolis. The council, established in 1994 to standardize building codes across the country, updates its recommendations every three years through a vote of its members, who include industry representatives as well as fire safety officials and building inspectors.

In Minneapolis, each side traded accusations that the other had paid for sympathetic members to travel to the convention. In the end, though, the vote was overwhelmingly in favor of sprinklers, 1,282 to 470.

Normally the council’s recommendations, which cover everything from toilets to garage doors, quickly become part of local rulebooks. This time, the homebuilders vowed to block sprinklers around the country. “I can’t recall any other time where there was such a wide national campaign to remove a provision from the code,” said Sara Yerkes, a vice president of the code organization.

As in other state capitals, homebuilders, realtors and developers had an outsized presence in Columbia. They had contributed more than $4.5 million to South Carolina’s politicians and parties during the prior three election cycles, second only to lawyers and law firms, according to the National Institute on Money in State Politics.

The most iconic gathering on the legislative calendar is the Bird Supper, held every spring since 1970 by the Home Builders Association of South Carolina. Lawmakers dine on fried quail, grits and green beans as they mix with members and bid for guided hunting trips. At the dinner, the group bestows its Hammer and Trowel Award on the year’s most builder-friendly legislator, and fetes the winner at an invitation-only gathering for PAC donors.

After Gov. Nikki Haley packed the state’s code council with industry-friendly appointees, the homebuilders’ trade group gave her their highest honor, the Hammer and Trowel Award. (Photo from the Building Industry Association of Central South Carolina’s Facebook page)

Debate over sprinklers had intensified in 2007 after nine firefighters died fighting a blaze at a giant furniture store in Charleston that had failed to install sprinklers. Fire officials, citing that tragedy as well as a 2004 Greenville motel fire that killed six guests, began pressing for sprinkler laws to be strengthened and expanded to homes.

As the state’s code panel considered the matter in 2009, Steven Mungo, then the president of the South Carolina homebuilders’ group, told members in a newsletter that it was time to step up again.

“Our political clout is largely driven by the number of members we represent and the amount of money we are able to raise,” Mungo wrote. “Our vigilance is all that will stop excessive regulation which sucks all the profitability out of our industry.”

To pressure the state code council, builders turned to supporters in the legislature. Two Republican state senators, William O’Dell (who the next year would receive the Hammer and Trowel Award) and Mike Fair (known for fighting to add creationism to the state school curriculum) wrote a letter opposing sprinklers to the code council’s chair, Frank Hodge. Their letter cited a study by a University of South Carolina economics professor asserting that 17,000 families would be priced out of the housing market that year if developers had to add on the cost of sprinkler systems.

What the letter didn’t say was that the faculty member, Joseph Von Nessen, is “a member and ardent supporter” of the builders’ group, as the group’s director referred to him in university emails obtained through a public records request. Von Nessen also works for his father’s marketing company, which has worked for the trade group.

Von Nessen said in an interview that he calculated the impact on homebuyers at the request of the builders group. He said he took household income data from the U.S. Census, then estimated the number of families at the time who would no longer be able to afford a home if the price of sprinklers were added. He said he stands by the accuracy of the figure he supplied to the builders.

The builders’ campaign faltered. Hodge, the code council chairman, was known as a stickler for minimum recommended codes, and the members were receptive to the vociferous arguments in favor of sprinklers made by the state’s fire marshal at the time, John Reich. In February 2010, the builders lost the first round when the code council voted to adopt the sprinkler mandate. The fight moved to the state legislature.

The builders plied state lawmakers with materials saying the requirement would result in economic disaster. Their predictions included a $100 million drop in tax revenue and a loss of “more than 10,000 full time jobs.” They framed the sprinkler requirement not as one of dozens of routine code updates but a “yearly $150+ million tax on homeowners.”

A group of lawmakers, led by Republican State Rep. Bill Sandifer, chairman of the labor, commerce and industry committee, introduced a bill to remove the code council’s authority to require sprinklers in single-family homes and duplexes.

Sandifer, a one-time Hammer and Trowel winner himself, was pleased to help the builders’ cause. “They’re one of the stronger groups, they’re highly respected,” he said in an interview. “What I’m trying to do is give the homebuilders the tools to ply their trade.”

Sandifer acknowledged that he advised colleagues to discount the international council’s recommendation on sprinklers because “it appears it’s more geared to European countries.” In fact, 99 percent of the group’s members are from the U.S., and Europe has its own code standards. But Sandifer’s argument gave some lawmakers one more reason to overturn the state code council’s action.

Nix, the director of the builders’ lobby, took aim at Reich, the fire marshal who was leading the firefighters as they tried to preserve the sprinkler mandate.

A towering man with a deep Southern baritone, Nix, 48, says he learned much of what he knows about politics by working as a director for the legendary conservative commentator William F. Buckley, Jr. on his TV talk show, “Firing Line,” in the 1990s. He accused the fire marshal of violating the law by lobbying on state time. He would call Reich’s boss, Adrienne Youmans — director of the state Department of Labor, Licensing and Regulation – and ask her to force Reich to stand down, according to Reich.

“It was a running order: ‘Get rid of John,’” Reich said in an interview.

Mark Nix, executive director of the Home Builders Association of South Carolina, has become one of the most powerful operatives in the state capital, Columbia. (AP Photo/Bruce Smith)

At one point, Nix filed a public records request for Reich’s emails and other communications, along with those of Reich’s deputy, Sondra Senn, who was also pushing for sprinklers and whose sister had recently died in a house fire. On another occasion, Nix snapped a photo of Reich in the statehouse as the fire marshal was campaigning for the sprinkler requirement. He emailed it to the governor and Reich’s boss.

“While I readily admit that I represent a special interest and lobby with my member’s money,” Nix wrote, “I never expected to have my taxes be used against me and my members to lobby for a mandate.”

Reich said in an interview that then-Gov. Mark Sanford shielded him from the political pressure, believing it was within the scope of his role as fire marshal to help promulgate safety codes.

While Nix worked to undercut Reich, the builders pushed their agenda with lawmakers, continuing to cite the 17,000 lost homebuyers. The trade group spent more than $130,000 lobbying the legislature that year, records show, with in-person meetings, phone calls and emails. Then-Sen. Phil Leventis, a Democrat and one of the strongest advocates of sprinklers, said the blitz focused on those who were least informed.

“Legislators are people with knowledge a mile wide and an inch deep. That’s easy to exploit,” Leventis said. “Almost nothing happens inside the chamber without support and approval from outside the chamber. Lobbyists shape what goes on inside.”

He said it’s common for lobbyists in the capitol to enlist major employers from lawmakers’ districts to make more tailored solicitations: “They can bring pressure to bear on someone inside in a way I can’t.”

The House voted 89 to 19 in April 2010 to block the sprinkler requirement and ultimately reject the entirety of the code council’s three-year update — in effect forcing the state to remain on 2006 codes until 2012.

Updated codebooks, already printed for local jurisdictions, were never used.

“Had we been unsuccessful, the economic impact on our industry would have been between $100-200 million each year,” Mungo, the president of the builders’ trade groups told members in a celebratory message.

Even more important, the new law ensured future fights would be fought on friendlier turf for the builders. Now legislative approval would be required anytime the code council changed the rules for residences. The homebuilders’ newsletter boasted that this would “prevent the inclusion of nefarious code provisions in the future.”

In the video distributed to the group’s members, Yandle attributed the success to the amount of money the builders had been able to spread around to lawmakers.

“The only way to get the seat at the table is to contribute to their campaigns and they’ll give us an appointment,” Yandle said. “Other than that it’s really hard to get in front of them.”

Mungo urged members in their newsletter to “take some of that money you will save as a result of this victory and contribute it to the PAC so we can have a significant influence on the upcoming elections.”

Then Mungo telegraphed the homebuilders’ next target. The sprinkler battle, he said, was only “round one” in a bigger fight against burdensome regulations.

“Look for significant restructuring of the Building Codes Council in the coming months,” Mungo wrote.

Five months after the anti-sprinkler bill passed, Haley was elected governor, succeeding Sanford. (Sanford had hung on even after it became public that his six-day disappearance in 2009 was due to an extramarital affair and not, as his aides initially claimed, a hike on the Appalachian Trail.)

Haley’s three successful state house campaigns, from 2004 to 2008, had received more than $23,000 from the home building and real estate industries. In her 2010 gubernatorial bid, developers, homebuilders and realtors gave more than $255,000, making them her top industry donor. (Her Democratic opponent, Vincent Sheheen, got $135,680.) During her first month in office, Haley was feted by the builders and realtors associations at a $100-a-ticket oyster roast fundraiser, held at a private clubhouse along the Saluda River outside Columbia.

The new governor moved quickly on matters that pleased the builders. First, she replaced Reich as fire marshal. “We knew who she was supported by,” Reich said in an interview, referring to the builders association and its leader, Nix. “By making an example out of me, he silenced a lot of others.”

Then Haley’s newly created inspector general’s office, as one of its first orders of business, launched an audit of the firefighters association, which had been the prime advocate of sprinklers and a target of the homebuilders. Among other things, the audit questioned whether the group was improperly supporting its lobbying with a stream of public money – the portion it receives of the 1 percent tax on state fire insurance premiums.

While the audit found no wrongdoing, the group soon halted its aggressive push for a sprinkler mandate. Charles Stewart, who owns one of the largest sprinkler installation businesses in the state, said that after the audit, the group’s director, Joe Palmer, stopped returning his phone calls. Stewart recalled that when he subsequently showed up at Palmer’s office, the director told him why the group had backed off.

“No one issue was important enough to jeopardize the 1-percent fund,” Stewart said. “That’s the hatchet, that’s what they use to manipulate them…He was sad. He knew they got worked. But he said he can’t put the whole organization at risk.”

Palmer, in an interview, said the audit had nothing to do with the group’s stance. A decision was made to focus on public education after the legislative loss, he said.

Next, Haley’s administration made changes to the state code council at the behest of the builders, records and interviews show.

The Lamirande family of upstate New York lost their 2-year-old daughter Nora in a 2015 fire. Their house, which didn’t have fire sprinklers, was built after state regulators rejected a bid to make the safety systems mandatory. (Courtesy Lamirande family)

The governor appoints the members of the council, who are charged with adopting and revising building codes that must be followed across the state. (By statute there are 16 seats, but during some periods slots have been vacant.) One seat is set aside for the homebuilders association; by law the rest are reserved for other stakeholders, including various construction trades, a fire service representative and a member of the public.

Frank Hodge, who had been the chairman of the council when it voted in favor of sprinklers, was quickly removed. His term was up and Haley didn’t renew it. The homebuilders “took me off,” Hodge said in an interview. “I knew they were trying to change the complexion of the building code council.”

By August 2012, the seat reserved for a physically disabled person was turned over to Brian Denny, a 39-year-old building supply worker from Columbia who had been paralyzed in an on-the-job accident. The homebuilders’ trade group, as part of its charitable work, had built him a new, wheelchair-friendly house that same year. The builders urged Haley to appoint Denny to the code council, according to interviews.

Lloyd Schumann, Denny’s retired predecessor in the designated council seat, described himself as not having been an ally of the builders. “I guess they needed a vote,” Schumann said. He said he was surprised to hear that the builders helped pay for Denny’s house: “That amazes me, that dumbfounds me. That kind of graft going on.”

In an interview, Denny said that while the builders paid for 70 percent of the house, the gift doesn’t affect his judgment on the council. A review of Denny’s financial disclosure forms shows he did not report the gift. He didn’t respond to subsequent messages asking for comment on why it wasn’t included.

Nix said in an interview that the builders had nothing to do with what happened to Reich or Hodge. In the case of Denny’s house, he said, the builders’ role was routine charity work and wasn’t intended to influence the council.

Then there was the seat set aside for a county official. When Nix learned it was coming open, he asked others in his trade group for recommendations in May 2012, and one member forwarded Nix’s message to Melissa Hopkins, then a plans examiner in Dorchester County. “Yes…I would be very interested. Let me know what I would need to do,” Hopkins responded.

Less than a month later, Hopkins emailed Nix with good news: “Good morning! Just to let you guys know, I received a letter yesterday from Gov. Haley letting me know my spot on the Council was confirmed…Thanks!”

In an interview, Hopkins said Haley appointed her because of her record, not because of Nix’s recommendation.

The council seat for a municipal administrator went to Curtis Rye, a councilman for the city of Forest Acres. At the time, a company owned by Rye and his wife sold shingles and other supplies to homebuilders and belonged to the homebuilders group. Rye said he is not affected by the group’s lobbying.

The council also designates a seat to represent insurers, a group typically in favor of stricter safety codes. Haley in 2012 appointed Frank Norris, a member of the homebuilders association who sells insurance to homebuilders. Nix confirmed he had recommended Norris to Haley’s office.

Norris would later be inducted into the homebuilders’ hall of fame. The citation for his 2013 award, presented at a Westin resort on Hilton Head Island, noted his “unwavering efforts to protect the home building industry.” Norris did not respond to requests for comment on his relationship with the trade group.

With the panel’s new lineup, and the 2010 win in the legislature, the homebuilders had little reason to worry about another push to mandate sprinklers. Moreover, Haley’s new fire marshal, Adolf Zubia, said the governor had given him an unmistakable message when she hired him: “You will never mandate residential sprinklers in the state of South Carolina.”

Yet even as Zubia, a brash native of New Mexico, agreed to that condition, he quietly resolved to set the stage for the code change under a future administration.

Zubia, 58, had been fire chief of the city of Las Cruces and was a past president of the International Code Council, the nonprofit that sets model building standards. He didn’t fit naturally into Columbia’s political culture; at one of the building industry’s iconic Bird Suppers, he walked the buffet line and stopped across from the display of small crispy game birds. “What are they serving, fried rats?” Zubia said loudly, one colleague recalled.

To Zubia, it was obvious that sprinklers prevent injuries and property damage and that they would someday be universal. He didn’t see himself as deceiving Haley. “If you have any sense of what is right and wrong, you will do certain things,” Zubia said.

Pushing for any change in the code would run up against the builders, Zubia knew, so he first proposed a compromise with Nix: in lieu of a statewide mandate, the state could leave the matter of residential sprinklers to individual towns and cities.

Nix turned him down. Furthermore, Nix wrote to Zubia, if “special interest groups” continued to ask for a mandate, the builders might go a step further and seek to have the state ban sprinklers permanently, according to an email.

Zubia recalled Nix being even more blunt in person, refusing to compromise because the builders had the legislature and the governor “in our pocket” - a statement Nix denied making.

Zubia’s fallback plan was to revisit the statewide sprinkler requirement with the code council. Even though the mandate was certain to be overturned by the legislature, it might give him leverage for a concession from the builders.

At the crucial meeting in May 2012, just over half the members of the code council remained by the time of the vote, and several of Haley’s appointees had not yet begun serving. Zubia seized the opportunity to push the sprinkler measure through.

That was when Zubia claims that Nix mouthed his pointed warning.

The next morning, Haley told Zubia he could remain in her administration only if he backed off his support of sprinklers. Zubia felt he had no choice but to resign.

“She’s basically telling you: ‘Just hang, be nice, don’t say a thing and don’t do a thing,’” Zubia said. “You can’t work that way.”

Gov. Nikki Haley told homebuilders in 2014 that she would do away with regulations: “Anything that gets in your way, that’s my job to stop it.” (Video from YouTube)

At its next meeting, the council rescinded the sprinkler requirement for single-family homes and duplexes. In exchange, the homebuilders did allow a modest concession. Townhomes would be required to have sprinklers, but builders could ignore that rule if they made the firewalls between units a little stronger.

In a letter to his staff, Zubia said he was resigning for family reasons, and that’s what South Carolina news outlets reported.

Zubia recalls driving away from the governor’s office, pulling over to call his wife with the news, and weeping. “The reason I’m not there is very simple,” said Zubia, who is in Nevada now as an assistant fire chief. “The homebuilders got to her.”

Haley’s spokeswoman declined to answer questions about Zubia’s ouster.

After their wins, the homebuilders continued to exert influence on Haley’s administration to ensure they wouldn’t have to fight sprinklers again. In October 2014, Katie Philpott, Haley’s director of boards and commissions, wrote to Grant Gillespie, the governor’s director of business and government affairs, about reappointing three members of the state code council. Gillespie forwarded the chain to Nix, then emailed Philpott back with Nix’s answer.

“He is good with them,” Gillespie wrote. “So they are good to reappoint.”

In an April 2014 speech, Haley promised homebuilders she would continue to do away with regulations. “Anything that gets in your way that’s my job to stop it,” she said. And this year, the builders association thanked Haley with their Hammer and Trowel award, saying she has been “instrumental” in passing favorable laws and calling her “a staunch supporter of the home builder agenda.”

The builders are now pushing legislation that ensures the state is not bound at all to recommendations written by the International Code Council, leaving safety rules entirely up to the state council instead.

In an interview, Nix said things are better in South Carolina now that “some of those characters who were causing those problems are gone.”

Read more of ProPublica’s coverage of politics and lobbying in our ongoing series, The Breakdown.

Robert Faturechi covers campaign finance, lobbying and politics. Before joining ProPublica, he was a reporter at The Los Angeles Times. He was a finalist this year for the Livingston Award for his report on an imploding Texas super PAC.