LAS VEGAS — Civil rights attorney Bill Murphy, who is representing Flint residents in a class-action lawsuit, has endorsed Hillary Clinton for president, according to a campaign aide.

Murphy said he decided to back Clinton “because she has a better relationship with communities of color than Bernie [Sanders] or any other candidate.” He made the announcement only days before the Nevada Democratic caucus, which appears to be a tight race between the two presidential candidates.

The well-known Baltimore lawyer, who also represented the family of Freddie Gray, who died in police custody, filed a federal suit against Michigan officials earlier this month. He is seeking compensation on behalf of Flint citizens for all water bills paid for undrinkable water tainted with lead.

view photo essay Political Theatre: The presidential campaign of Hillary Clinton Clinton arguably boasts experience in government unparalleled by anyone in the presidential field — but that has also made her a high-profile target for attack.

Clinton traveled to the Michigan city last week and met with Murphy, as well as clergy and residents affected by the toxic water crisis, which she called “immoral.” She also argued that race played a role in the city’s negligence.

“Just ask yourself, would this have ever occurred in a wealthy, white suburb of Detroit? Absolutely not,” she said in Harlem on Tuesday. “Flint is not alone. There are many Flints across our country: Places where people of color and the poor have been left out and left behind.”

Clinton and Vermont Sen. Bernie Sanders, who are locked in a tight presidential primary race, have been competing for endorsements from prominent voices in the African-American community. On Wednesday, Clinton received the support of Sandra Bland’s mother, Geneva Reed-Veal, and Sanders campaigned with Eric Garner’s daughter, Erica, earlier this week.

In a statement provided to NBC News, Murphy said he preferred Clinton “because she has been truly loyal to President Obama and is the best person to protect and build on his legacy.”

He also cited Clinton’s legal background. “Hillary’s background as a lawyer puts her in a better position than Bernie or any other candidate to understand who should be nominated to the Supreme Court,” he wrote.

Murphy, who will campaign for Clinton in South Carolina next week, praised Clinton’s foreign policy experience and said outright that Sanders lacked comparable “knowledge, experience and success.”

“And most important,” Murphy said, “because never again do we want our hearts broken and our hopes dashed by nominating a wonderful candidate who can’t beat the Republicans in the general election.”