Mario Tama/Getty Images(SAN YSIDRO, Calif.) — U.S. border officials have temporarily closed a port of entry along the U.S.-Mexico border as thousands of Central American migrants wait in Tijuana to apply for asylum in the U.S.

The port of entry at San Ysidro, north of Tijuana and south of San Diego, have been closed since about 11:30 a.m. Sunday, U.S. Customs and Border Patrol said in a statement.

Some demonstrators on the Mexico side of the border "split off to heard towards multiple locations along the border," and some attempted to enter the U.S. in areas "directly east and west" of the border crossing, the release stated. Some also attempted to enter the U.S. through northbound and southbound vehicle lanes at the port of entry, but they were "stopped and turned back to Mexico," according to CBP.

The attempts to "illegally enter the U.S." continued, and CBP agents responded to them, it said.

United States Secretary of Homeland Security Kirstjen Nielsen said in a statement that the border was closed "to ensure public safety in response to large numbers of migrants seeking to enter the U.S. illegally."

Some migrants threw “projectiles” at CBP agents, Nielsen said.

"After being prevented from entering the Port of Entry, some of these migrants attempted to breach legacy fence infrastructure along the border and sought to harm CBP personnel by throwing projectiles at them,” Nielsen said. “As I have continually stated, DHS will not tolerate this type of lawlessness and will not hesitate to shut down ports of entry for security and public safety reasons. We will also seek to prosecute to the fullest extent of the law anyone who destroys federal property, endangers our frontline operators, or violates our nation’s sovereignty."

CBP had deployed additional agents to the border in preparation for multiple planned demonstrations, it said. The border was closed "to prepare for the possibility that additional groups would also break off from demonstrations for a possible attempt or attempts to rush illegally through the port of entry," the release stated.

Member of the U.S. Army were present at the request of CBP and moved some of the barricades at the border, a spokesperson for the U.S. Army North told ABC News.

CBP agents, members of the military and federal, state and local law enforcement officers will continue to have a “robust presence” along the Southwest border “to prevent illegal entry or violence,” Nielsen said, adding that officials will “continue to stay in close contact with Mexican authorities” to resolve the situation safely.

Members of the U.S. Army will not be conducting law enforcement functions but are authorized to provide protection for CBP agents “and help make sure CBP personnel can perform their assigned Federal functions,” the Army said in the statement.

Military police are armed with batons and shields but not pistols, according to officials.

Video taken at the scene shows some migrants running near a canal close to the border, others gathering near an open fence near the border and some walking over a broken fence. One shot shows a migrant who climbed on top of a train holding a Honduran flag.

Mexico's Interior Ministry said federal and state authorities in Baja California were able to contain a group of about 500 migrants tried to cross the border "in a violent way."

The country's National Institute of Migration will "immediately deport" the people who "participated in these violent events," according to the Interior Ministry.

Mexico will not deploy military forces "in accordance with its internal policy of respect for human rights, and the non-criminalization of migration," according to the government's statement. But, the government will reinforce the border points that people broke through as they tried to cross over to the U.S., the statement read.

The number of people in the caravan currently stands at 8,247, according to the Mexican government. More than 7,400 of those migrants are currently located in the state of Baja California in the cities of Mexicali and Tijuana, the Interior Ministry said.

Copyright © 2018, ABC Radio. All rights reserved.