Washington (CNN) President Donald Trump and Homeland Security Secretary Kirstjen Nielsen got into a lengthy, heated argument during a Cabinet meeting focused on immigration Wednesday, a source with knowledge of the blowup told CNN.

Trump was furious with Nielsen, telling her he didn't think she was doing enough to secure the border. But Nielsen stood her ground, citing the law in certain instances, the source said.

A separate White House official confirmed that Trump exploded over immigration in front of the Cabinet. The official described the remarks as "angry and heated" but also as fairly typical for Trump on this issue.

The New York Times first reported on the blowup, saying Trump berated Nielsen to the point she told colleagues she was close to resigning after the incident.

Two people told the Times that Nielsen, the Cabinet head who oversees agencies responsible for immigration enforcement and border security, drafted a resignation letter.

Read More