BALTIMORE — Barack Obama, Hillary Clinton, and other dignitaries celebrated the life of Elijah Cummings on Friday — and, in eulogizing him, defended him as a pillar of honor and integrity even as he was drawn into a messy, public spat with President Donald Trump in the final months of his life.

No one mentioned Trump by name, but Cummings’ widow, Maya Rockeymoore Cummings, made clear that attacks from the president had worn on Cummings. Over the summer, Trump had called the late congressman a “bully” and in racist tweets, called Cummings’ beloved Baltimore a “rat and rodent-infested place.”

Rockeymoore Cummings told the hundreds of mourners who gathered to say farewell to her late husband that those attacks had “hurt him.”

“What Congressman — Chairman Cummings did was not easy. And it got infinitely more difficult in the last months of his life, when he sustained personal attacks and attacks on his beloved city," Rockeymoore Cummings said. “And while he carried himself with grace and dignity in all public forums, it hurt him."

Former president Obama said that Cummings’ voice — a deep baritone and “prophetic” — was comforting during the good times but essential during hard times. Cummings, he said, was a man of honor and integrity. Obama didn’t mention Trump by name, but it was clear his words were about a contrast between the two men.

“There's nothing weak about looking out for others. There's nothing — there's nothing weak about being honorable,” Obama said. “You're not a sucker to have integrity and to treat others with respect. I was sitting here and I was noticing the ‘Honorable’ Elijah E. Cummings. You know, this is a title that we confer on all kinds of people that get elected to public office.”

Obama has been reluctant to openly criticize Trump, but paused for a beat or two, as if to hammer home his point.

“But Elijah Cummings was honorable before he was elected to office,” Obama added. “There’s a difference if you were honorable and treated others honorably.”

Hillary Clinton was more direct, saying in her remarks that Cummings had “weathered storms and earthquakes but never lost his faith.” “Like that Old Testament prophet, he stood against corrupt leadership of King Ahab and Queen Jezebel,” she said.

“He had little tolerance for those who put party ahead of country or partisanship above truth,” she said to applause. “But he could find common ground with anyone willing to seek it with him."

Former president Bill Clinton added in his own speech, “You can’t run a free society if you have to hate everybody you disagree with.”

Cummings died on Oct. 17 due to what his office said were “complications concerning longstanding health challenges.” On Thursday, he became the first black elected official to lie in state at the US Capitol. It was a formal testament to the power of his life’s narrative: the rise of a son of Baltimore who overcame hardships to become one of the most powerful and most respected members of Congress.

On Friday, his family and friends celebrated the man, devoted father, husband, mentor, boss, trusted colleague, and friend.

When it wasn’t filled with the emotion of tender, personal remembrances or heartfelt enthusiasm, the air in the cavernous auditorium of the New Psalmist Baptist Church was politically charged. The service was attended by almost half a dozen candidates currently running for the Democratic nomination for president. Cummings’ death has also set off immediate questions over who will fill his congressional seat, and take over as chair of the House Committee Oversight and Government Reform, a key committee involved in the impeachment proceedings.

House Speaker Nancy Pelosi, who is originally from Baltimore and is now grieving her brother, said in her remarks that she liked to call Cummings her “Baltimore brother” in Congress. She said Cummings told her to send him new first-term lawmakers because he wanted to play a role in shaping their futures. Pelosi announced that HR3, legislation designed to lower prescription drug prices, will bear his name.

Trump told reporters on Friday that he sent his regards to Cummings’ friends and family and had admired Cummings’ passion for reducing drug prices.

On Thursday at the Capitol, dozens of members of the Congressional Black Caucus kept vigil around his casket. They trickled in slowly Friday, reeling as a group over what his loss will mean, especially as the House continues to investigate Trump.

“Obviously losing him at any time is terrible,” said California Rep. Karen Bass, the chair of the Congressional Black Caucus told BuzzFeed News on Thursday. “But losing him at this time is especially tough.”