U.S. Customs and Border Protection officers stand guard at the San Ysidro port of entry in San Diego after the border crossing with Mexico was temporarily closed Monday. (Adrees Latif/Reuters)

Homeland Security officials said Monday they have further restricted vehicle traffic at the San Ysidro border crossing, the nation’s busiest, after receiving reports that crowds of migrants in Tijuana, Mexico, might attempt to overrun their checkpoints.

U.S. Customs and Border Protection closed the entire San Ysidro crossing in San Diego for several hours before dawn, installing additional layers of razor wire and concrete barriers. It reopened with 10 of the port’s 26 vehicle lanes closed.

The temporary closure was one of several measures the government has taken in recent days to “harden” U.S. border crossings as thousands of Central American migrants in caravan groups arrive in Tijuana with the goal of entering the United States.

Over the weekend, work crews decked out the border fence at the southern end of San Diego’s Imperial Beach with billowing, 18-foot thickets of concertina wire, a sight President Trump celebrated in a tweet saying, in part, “no climbers anymore under our Administration!” In recent weeks, U.S. military personnel and construction crews have installed 12.3 miles of razor wire along the Mexico border, according to one Homeland Security official.

The fortifications are needed, border officials say, to ensure that large crowds do not attempt to force their way into the country.

“In the early morning hours, CBP officials received reports of groups of persons from the caravan gathering in the city of Tijuana for a possible attempt or attempts to rush illegally through the port of entry instead of presenting themselves as required to a CBP officer,” the agency said Monday in a statement.

“CBP officials suspended operations to safely place impediments at the port of entry that would restrict access to a large group attempting to run through the border crossing. After the CBP response at San Ysidro, no activity materialized at the border crossing,” the statement said.

Pueblo Sin Fronteras, an activist group that is helping guide the caravan, rejected claims of plans to rush the border as a “deliberate attempt to mislead the public and demonize refugees.”

Nearly 6,000 migrants have arrived in Tijuana so far, and 1,600 are in the city of Mexicali seeking to enter the United States, according to the latest Department of Homeland Security figures. In total, between 8,500 and 10,500 are traveling with the caravan groups, DHS officials said.

Many of the migrants arriving in Tijuana say they are running for their lives from gang violence and criminality in Central America, particularly Honduras, and they plan to seek asylum in the United States.

U.S. officials have urged them to approach the ports of entry to make their claims, and Trump has decreed new restrictions on the ability of those who enter the United States illegally to apply for asylum. CBP officials say they are processing between 60 and 100 asylum seekers per day.

But with thousands of asylum seekers in Tijuana parked on a waiting list for the chance to approach the U.S. crossing and make a claim, it may be months before migrants arriving with the caravan get a chance.

That has U.S. officials worried about more-desperate attempts to cross, especially if large groups gather along the border and the situation turns hostile.

The top U.S. border official, Kevin McAleenan, was nearly struck by a rock when he approached the fence to speak with migrants late Friday, according to San Diego Border Patrol sector chief Rodney Scott.

“While conversing through the wall with people on the south side, someone threw a large rock at the Commissioner, narrowly missing him,” Scott wrote in a post on Instagram.

DHS officials confirmed the incident Monday but said they do not know who threw the rock, which was about the size of a golf ball. McAleenan was unharmed.

Trump said earlier this month that U.S. troops would treat rock-throwing as an armed attack, but he walked back those comments the next day and said soldiers would not open fire.

Sarah Kinosian in Tijuana and Maria Sacchetti in Washington contributed to this report.