President Donald Trump lashed out at the musician John Legend and his wife, the model Chrissy Teigen, on Sunday night after Legend appeared in an NBC News special report because Trump said the couple did not give him and the GOP enough credit for passing bipartisan criminal justice legislation.

"When all of the people pushing so hard for Criminal Justice Reform were unable to come even close to getting it done, they came to me as a group and asked for my help," Trump tweeted. "I got it done with a group of Senators & others who would never have gone for it. Obama couldn’t come close."

....A man named @VanJones68, and many others, were profusely grateful (at that time!). I SIGNED IT INTO LAW, no one else did, & Republicans deserve much credit. But now that it is passed, people that had virtually nothing to do with it are taking the praise. Guys like boring..... — Donald J. Trump (@realDonaldTrump) September 9, 2019

.....the importance or passage of Criminal Justice Reform. They only talk about the minor players, or people that had nothing to do with it...And the people that so desperately sought my help when everyone else had failed, all they talk about now is Impeaching President Trump! — Donald J. Trump (@realDonaldTrump) September 9, 2019

Trump's tweets followed a town hall event hosted by "NBC Nightly News" anchor Lester Holt from inside New York's Sing Sing prison that aired Sunday night on MSNBC — the culmination of the "Justice for All" series on the criminal justice system.

The bipartisan bill Trump signed in December was discussed during the town hall, during which Holt asked prisoners for their ideas on overhauling the criminal justice system. Matthew Charles, who was sitting in the front row, was recognized as one of the first people released under the legislation. Footage of Trump signing the bill, known as the First Step Act, also was shown during a re-airing of Holt's "Justice for All" special just before Sunday night's town hall.

That program reported that the criminal justice package would curb sentences for many in federal prisons. Holt noted, however, that the vast majority of those in the prison system are in state and local facilities and would not be affected by the legislation.

Legend, an award-winning singer and founder of the criminal justice advocacy group FreeAmerica, joined Holt during the prison town hall.

Early Monday morning, he responded to Trump's angry tweets.

"Imagine being president of a whole country and spending your Sunday night hate-watching MSNBC hoping somebody — ANYBODY — will praise you," Legend tweeted. "Melania, please praise this man. He needs you."

"Your country needs you, Melania," he added.

Teigen responded with an expletive-laden tweet, adding in a second post, "The absolute best part of his tweet is I literally didn't speak in the special, nor was I mentioned. I'm cackling at the pointless addition of me because he cannot not be a bitch."

Both Teigen and Legend were trending nationally on Twitter Monday morning.

Sunday was not the first time Trump suggested he was not getting enough credit for signing the criminal justice bill into law. Last month, he told reporters outside the White House, "I did criminal justice reform, which President Obama could not get approved, which the media never talks about."

CORRECTION: (Sept. 9, 2019, 3:36 p.m.): An earlier version of this article misstated a topic of discussion on the "Justice for All" town hall that aired on MSNBC Sunday night. The First Step Act was discussed on the town hall; it was not left out.