US military troops to be allowed to defend border patrol agents: Official Troops will be granted new authorities to protect border personnel from threats.

The White House is set to announce on Tuesday that active duty troops deployed to the U.S.-Mexico border will be granted new authorities that allow them to protect Customs and Border Protection (CBP) personnel from a threat, according to a U.S. official.

Currently, the 5,900 troops on the southern border can act in self-defense, but do not have the authority to intervene if CBP personnel were overwhelmed by migrants.

CNN was first to report about the additional authorities.

The Department of Homeland Security (DHS) did not confirm the expected White House announcement but stressed in a statement the importance of personnel safety.

“As Secretary Nielsen has said, we will not allow our frontline personnel to be in harm’s way," DHS spokesperson Kate Waldman told ABC News. "We will do everything we can to protect those who defend our nation’s sovereignty and secure our border. We appreciate the Department of Defense stepping in to assist the Department of Homeland Security as needed.”

Three thousand migrants, mostly escaping violence and poverty in Central America, have poured into Tijuana in recent days, according to the Associated Press.

The U.S. port of entry across from Tijuana in San Ysidro, Calif., was closed for three hours early Monday after immigration authorities said they had received reports that members of a migrant caravan were gathering in Tijuana and planned to "rush" the border.

CBP closed northbound lanes towards the nation's busiest border crossing, while military troops worked to install items like "jersey barriers and concertina wire," CBP said. According to a DHS official, the suspension of the port also allowed CBP to move additional personnel to the area.

However, it turned out to be a false alarm with CBP saying no migrants ever arrived.

The new authorities come as Defense Secretary James Mattis had earlier rejected a CBP request that would have allowed troops to perform activities like crowd control and riot control because the Pentagon considered them to be law enforcement.

Active duty troops are prohibited by federal law from performing law enforcement activities unless specifically ordered by Congress or the president.

Troops are currently scheduled to deploy to the border through Dec. 15 unless the Pentagon is "directed otherwise," Department of Defense spokesperson Col. Rob Manning told reporters on Monday.

"And at some point in time when the work is done, we'll start downsizing capability or shift capability elsewhere on the border," Manning said, adding that the troop presence would fall in line with requests from CBP and DHS.

The Pentagon has yet to provide an official cost estimate for the deployment.

ABC News' Jack Date contributed to this report.