Speaking to reporters outside the White House on Monday before traveling to Mississippi for two campaign rallies, President Trump defended U.S. Border Patrol authorities for using tear gas to repel a crowd of caravan migrants who rushed toward the border on Sunday afternoon.

Some of the migrants were videotaped throwing projectiles across the port of entry in San Ysidro, Calif., while others apparently tried to breach fencing. Inbound and outbound traffic there was locked down for approximately six hours in response.

"They had to use it; they were being rushed by some very tough people," Trump said. "And so they used tear gas. Here's the bottom line: No one's coming into our country unless they come in legally."

The president added that while it's still possible to reach a deal with Mexico to keep the migrants there while they pursue asylum claims to enter the U.S., he is considering locking down the entire southern border. Trump administration officials have characterized the vast majority of asylum claims as fraudulent or legally insufficient, and have taken steps to reduce the backlog of asylum applications.

"Mexico wants to see if they can get it straightened out, but we've during certain times closed the border," Trump said. They're not coming into the United States. They will not be coming into our country."

The situation Sunday was not unprecedented. In 2013, during the Obama administration, Border Patrol agents used pepper spray to fend off a crowd of approximately 100 migrants who attempted to rush the San Ysidro port of entry. The migrants in that episode also reportedly threw rocks and bottles at U.S. authorities.

"They had to use it; they were being rushed by some very tough people." — President Trump

Nevertheless, prominent Democrats lined up to hammer the administration on Monday, as images of migrants fleeing tear gas fumes circulated. New York Democratic Sen. Kirsten Gillibrand, for example, called the use of tear gas “horrendous.”

Other analysts suggested that a rework of the immigration system might be necessary to dissuade similar efforts by members of any future migrant caravans without encouraging clandestine migration. John Cerone, a visiting professor of international law at The Fletcher School at Tufts University, told Fox News that he would recommend "the creation of new visa categories that people can apply for without having to physically come to the U.S. first."

WATCH: HUNDREDS OF MIGRANTS RUSH PORT OF ENTRY

The president on Monday also defended his administration's zero-tolerance policy of prosecuting every individual caught crossing the border illegally, which under previously existing law resulted in children being separated from their parents at higher rates than in previous administrations. Trump signed an executive order this summer aimed at ending separations of legitimate family units caught crossing the border.

"[President] Obama had a separation policy -- we all had the same policy. I tried to do it differently. But Obama had a separation policy, but people don't like to talk about that," Trump said.

Separately, Trump hammered General Motors for announcing it will cut approximately 15,000 jobs in North America and halt production at several plants, including facilities in Lordstown, Ohio, Hamtramck, Michigan, and Oshawa, Ontario.

"I'm not happy with what she did," Trump said, referring to General Motors CEO Mary Barra. "The United States saved General Motors."

His comments came shortly after The Wall Street Journal quoted Trump saying, in an interview, that "They better damn well open a new plant there [in Ohio] very quickly."

BORDER OFFICIALS USED PEPPER SPRAY DURING OBAMA ADMIN TO REPEL MIGRANTS AT SAN YSIDRO CROSSING

"We don't like it," Trump added. "I believe they'll be opening up something else. And I was very tough. I spoke with her when I heard they were closing and I said, you know, this country has done a lot for General Motors. You better get back in there soon. ... We have a lot of pressure on them."

The president insisted GM's actions had "nothing to do with tariffs" or his administration's ongoing trade showdown with China. Instead, Trump laid blame squarely at what he characterized as GM's mismanagement.

"That car is not selling -- the Chevy Cruze, it's not selling," Trump said. On Monday, GM announced it would cease production of the Chevrolet Volt semi-electric car, as well as the compact Chevrolet Cruze and the Impala.

Trump is set to host two rallies in Mississippi on Monday evening ahead of Tuesday's pivotal special election there. Incumbent Sen. Cindy Hyde-Smith, who was appointed to the seat in March, is facing off against Mike Espy, who served in former President Bill Clinton's administration.

"I've known her for a period of time now as a senator -- she's been an excellent senator," Trump said. "I'm going there -- I'm going to make, I guess, two rallies on top of everything else. And I hope you're all coming."

Hyde-Smith, who was appointed to fill retired Republican Sen. Thad Cochran's seat, was recorded during a campaign stop saying that if a supporter invited her to a "public hanging," she would be in "the front row.” The Mississippi lawmaker has since said her comment was made in jest and denied any racial connotation.

Amid fallout from those remarks, Major League Baseball asked that Hyde-Smith return the organization’s $5,000 donation. Other organizations have made similar requests.

But Trump said Hyde-Smitch "felt very badly, and she certainly didn't mean that, and she's already apologized and I think very strongly."

The president also reacted to climate reports -- including one released by his administration on Friday -- that warned of potentially significant economic consequences if the U.S. doesn't immediately act to curb greenhouse gas emissions.

"I've seen it, I've read some of it, and it's fine," Trump said, referring to the report prepared by 13 federal agencies. "I don't believe it," he added, referring to the report's conclusions about the economic impacts of global warming.

He pointed out that the U.S. is cutting carbon emissions more than the European countries that have criticized his policies.

"You're going to have to have China, and Japan, and all of Asia, and all of these other countries -- right now, we're at the cleanest we've ever been, and it's very important to me," Trump said. "If we're clean, and every other place on Earth is dirty, that's not so good."

The president added he was "not happy at all" that Russia's military apparently opened fire and seized three Ukrainian naval vessels in the Black Sea off the coast of the Crimean Peninsula Sunday, escalating tensions in the disputed region.

"We've let our position be known, and we're not happy about it," Trump said.

Fox News' Alex Pappas and Andrew O'Reilly contributed to this report.