Democratic presidential candidate Hillary Clinton speaks during "King Day at the Dome 2016" ceremonies in front of the South Carolina State House in Columbia on Jan. 18. (Jason Miczek/Reuters)

Hillary Clinton devoted her entire closing statement at the Democratic debate here to the lead-poisoning crisis in Flint, Mich., a racially tinged health and public policy disaster that the Democratic front-runner casts as a test of her approach to leadership.

Clinton took credit Sunday for shaming Michigan’s Republican governor into action on behalf of the majority-black city, where mostly poor residents had been drinking and bathing in toxic water for more than a year. She grew angrier as she spoke, fairly spitting the words as she accused Gov. Rick Snyder of callously ignoring the problem because the victims aren’t politically influential.

“He had requests for help that he basically stonewalled,” Clinton said. “I’ll tell you what, if the kids in a rich suburb of Detroit had been drinking contaminated water and being bathed in it, there would’ve been action.”

Clinton’s outrage was clear and so was the subtext. She was speaking in South Carolina, where the Democratic primary vote Feb. 27 will be decided largely by African American voters. She was speaking on the eve of the Martin Luther King Jr. holiday. And she was standing onstage with a surging, liberal white rival whose strength with black voters is no match for her own.

The Flint water crisis has emerged this month as a flash point of liberal anger, although the problem is more than a year old. Clinton had seized on it even before raising it Sunday night during the last debate before presidential voting begins.

Clinton said she had dispatched a top campaign aide to Flint “to see what I could do to help.” The approach is classic Clinton — hands-on and practical, with a heavy dose of policy wonk — and she suggested it is emblematic of how she would govern as president.

“I issued a statement about what we needed to do and then I went on a TV show and I said it was outrageous that the governor hadn’t acted,” Clinton said. “And within two hours he had.”

That television show was “The Rachel Maddow Show” on MSNBC, a mainstay of liberal advocacy and commentary. The campaign aide was Amanda Renteria, Clinton’s national political director and a frequent Clinton emissary to minority voters.

“This is infuriating to me. I did a lot of work on trying to get rid of lead in residential housing in Upstate New York. I care deeply about this issue. We know it has effects on behavior and educational attainment,” Clinton said on the broadcast Jan. 14.

Clinton’s appearance there was part of a stepped-up tempo and new, sharper attacks on Sen. Bernie Sanders (Vt.) as Sanders has erased her once-formidable lead in Iowa, where the first presidential selection contest takes place Feb. 1.

“I want to be a president who takes care of the big problems and the problems that are affecting the people of our country every day,” Clinton said to applause Sunday night.

Then it was Sanders’s turn, and he sought to one-up Clinton before pivoting to his main theme of economic inequality.

“Well, Secretary Clinton was right,” he said. “And what I did, which I think is also right, is demanded the resignation of the governor. A man who acts that irresponsibly should not stay in power.

“Now, we are a great nation, and we’ve heard a lot of great ideas here tonight,” Sanders continued. “Let’s be honest and let’s be truthful. Very little is going to be done to transform our economy and to create the kind of middle class we need unless we end a corrupt campaign finance system which is undermining American democracy.”

Snyder responded with a flurry of Twitter messages as the debate ended.

“Political statements and finger pointing from political candidates only distract from solving the Flint water crisis,” the Michigan governor said.

Snyder had asked for federal help Thursday, and President Obama signed an emergency declaration Saturday for Michigan, clearing the way for federal aid.

Clinton first issued a statement about Flint on Jan. 11, and a day later she called for state and federal action including a health monitoring system. Both statements were initially distributed only among Michigan media, a Clinton aide said. They followed an early-morning request from Clinton on the 11th, asking for a full briefing on Flint, a Clinton campaign aide said.

Told the campaign planned a statement of concern, Clinton said she wanted to go further, said the aide who requested anonymity to describe the internal campaign discussion.

“Alarm is all fine and good but I want action,” the aide quoted Clinton as saying.

Renteria, a former top aide to Michigan Sen. Debbie Stabenow, and another Clinton staffers met with Flint’s mayor Jan. 13.

The session covered “the need for accountability,” a Clinton aide said. “While state Republicans have tried to blame everyone but themselves, the truth is they have repeatedly turned a blind eye to environmental issues under Governor Snyder’s leadership.”

Clinton is not calling for Snyder’s resignation now, however.

Clinton is trying to hold off Sanders and avoid a repeat of the damaging dynamic that overtook her in 2008, when then-Sen. Barack Obama’s insurgent campaign outperformed hers in Iowa and reset the race. Their contest took a nasty turn in South Carolina, where some black leaders felt that Clinton and former president Bill Clinton took their support for granted.

And Clinton knows that black voters are a weak link in the Sanders coalition, which, like Obama’s, includes many young and new voters. She is counting on black voters, and the first test of their support for her will be the South Carolina vote.

Clinton has worked for more than a year to repair ties here, including with South Carolina’s senior African American statesman, Rep. James E. Clyburn. Clyburn has said Bill Clinton blamed him for his wife’s nearly 30-point loss in South Carolina in 2008 and called him to deliver a profane tirade.

Hillary Clinton was all high ground Sunday and again when campaigning here Monday.

“We are all diminished by racism and bigotry and injustice no matter who we are,” Clinton said Monday at a King holiday commemorative event in the state capitol of Columbia.

“When the children of majority-black Flint, Michigan, have been drinking and bathing in lead-poisoned water for more than a year, making sure all Americans have clean air and water isn’t just a health issue, it’s a civil rights issue. We would be outraged if this happened to white kids, and we should be outraged that it’s happening right now to black kids.”

Sanders, meanwhile, sees Clinton’s long ties to the financial industry as perhaps her weakest point, and a prime motivator for his supporters. He hammered Clinton on those points throughout the debate sponsored by NBC and YouTube, and he said relatively little about issues of specific concern to black voters.

For more than a year, parents in Flint had raised complaints that a cost-saving decision to change the city’s water source in 2014 had left them with foul-smelling and potentially dangerous water. Their concerns got little response from local and state officials until last fall, when tests confirmed alarmingly elevated lead levels in the water and in the blood of some children.

The economically struggling city 60 miles north of Detroit was under the control of a state-appointed emergency manager when the decision to switch water supplies was made, although the chain of events is in dispute. Flint switched back to Detroit water in October.

Obama’s decision to issue the emergency declaration Saturday frees up the Department of Homeland Security and the Federal Emergency Management Agency to coordinate relief efforts, help with emergency measures “and to lessen or avert the threat of a catastrophe in Genesee County,” according to a White House announcement.

Federal aid will come in the form of water, water filters, filter cartridges, test kits and other items.

John Wagner in Columbia, S.C., contributed to this report.