Updated

A spokesman for the Department of Homeland Security denied a New York Times story on Thursday saying Secretary Kirstjen Nielsen nearly resigned this week after President Trump “berated” her in front of other Cabinet members.

“The @nytimes article alleging that the Secretary drafted a resignation letter yesterday and was close to resigning is false,” said Tyler Q. Houlton, a DHS spokesman. “The Secretary is hard at work today on the President's security-focused agenda and supporting the men and women of @DHSgov.”

The New York Times reported Trump, who has long promised to build a wall on the border with Mexico, lashed out at Nielson over the border not being secured. The paper said Nielsen drafted a resignation letter but has not submitted it.

In a statement, Nielsen did not address the reports that she considered quitting. But she said Trump “is rightly frustrated that existing loopholes and the lack of Congressional action have prevented this administration from fully securing the border and protecting the American people.”

“I share his frustration,” Nielsen said. “Border security is the most basic and necessary responsibility of a sovereign nation.  These are complex issues and I will continue to direct the Department to do all we can to implement the President’s security-focused agenda.”

Added Nielsen, “It is my great honor to represent the men and women of DHS who work every day to enforce our laws and secure our nation.”

White House press secretary Sarah Huckabee Sanders also didn’t address the reports about Nielsen considering resigning. But she said, “the president is committed to fixing our broken immigration system and our porous borders.”

“We are a country of laws and the president and his administration will enforce them," Sanders said.

Fox News’ Kristin Brown and Jake Gibson contributed to this report.