Washington (CNN) President Donald Trump offered up rare praise for Kirstjen Nielsen during a closed-door meeting with House Republicans Tuesday night, a source in the room told CNN, a notable vote of confidence for the previously embattled homeland security secretary.

He then lauded her publicly in a tweet, an honor in his book, remarking that she "did a fabulous job yesterday at the press conference explaining security at the border and for our country, while at the same time recommending changes to obsolete & nasty laws, which force family separation. We want 'heart' and security in America!"

Homeland Security @SecNielsen did a fabulous job yesterday at the press conference explaining security at the border and for our country, while at the same time recommending changes to obsolete & nasty laws, which force family separation. We want "heart" and security in America! — Donald J. Trump (@realDonaldTrump) June 20, 2018

Nielsen was pushed in front of cameras abruptly Monday to defend the practice of separating parents from children at the border after images of children being kept in chain-link cages dominated cable news coverage and prompted widespread outrage from Democrats and Republicans. Critics said she did little to answer their questions about the zero-tolerance policy as she, at times, contradicted what other administration officials have said regarding whether it was aimed at deterring other immigrants from crossing the border illegally.

JUST WATCHED CNN reporter: How is this not child abuse? Replay More Videos ... MUST WATCH CNN reporter: How is this not child abuse? 01:46

"This administration did not create a policy of separating families at the border," Nielsen said during the briefing, later bristling when asked if the policy was intended to stir up outrage.

"I find that offensive," Nielsen said. "Why would I ever create a policy that purposely does that?"

Read More