NBC News issued a correction Sunday for a tweet erroneously claiming President Trump called Confederate general Robert E. Lee "incredible."

The tweet came hours after Trump assailed the news outlet for misleading its audience about what he had said during a rally Friday night.

"CORRECTION: An earlier tweet misidentified the general President Trump described as 'incredible' at a rally in Ohio. It was Gen. Ulysses S. Grant, not Gen. Robert E. Lee. An attached video clip lacked the full context for Trump's remark," NBC News' Twitter account said, along with a longer clip offering further context.

During that rally in Ohio on Friday, Trump offered praise to both Grant, who after the Civil War would become a U.S. president, and Lee, calling them "great" generals. But his "incredible" comment was in reference to Grant, who was the focus of his story.

"So Robert E. Lee was a great general. And Abraham Lincoln developed a phobia. He couldn’t beat Robert E. Lee," Trump said. He later emphasized that Grant too was a "great general" who “knocked the hell out of everyone,” and added the "incredible" bit while talking about how Grant "drank a little too much."

Trump condemned NBC News in a tweet Sunday morning for the botched reporting.

"NBC News has totally and purposely changed the point and meaning of my story about General Robert E Lee and General Ulysses Grant," he said. "Was actually a shoutout to warrior Grant and the great state in which he was born. As usual, dishonest reporting. Even mainstream media embarrassed!"

Trump later thanked NBC News for the correction.

[Also read: NBC's Lester Holt: Reporters should find another job if they're bothered by Trump's insults]