President Trump and Vietnamese President Tran Dai Quang participate in a welcome ceremony at the presidential palace in Hanoi on Nov. 12. (Jonathan Ernst/Reuters)

Three military personnel have been reassigned from their White House jobs amid allegations that they had improper contact with foreign women while traveling with President Trump on his recent trip to Asia, according to officials familiar with the situation.

The service members worked for the White House Communications Agency, a specialized military unit that helps provide the president, vice president, Secret Service and other officials with secure communications.

The military is scrutinizing three Army noncommissioned officers who allegedly broke curfew during Trump’s trip to Vietnam this month, officials said.

Mark Wright, a spokesman for the Defense Department, confirmed that the Pentagon is examining the behavior of personnel during the visit to Vietnam.

“We are aware of the incident, and it is currently under investigation,” Wright said.

If found guilty, the service members face the risk of losing their security clearances or could be subject to administrative discipline or courts-martial.

Trump visited Vietnam as part of a 12-day swing through Asia.

The episode comes after four military personnel on the same White House team faced allegations related to their behavior during a trip to Panama in August with Vice President Pence.

Those men — two from the Army and two from the Air Force — stood accused of taking foreign women after hours into a secure area as they were preparing for Pence’s arrival, officials said.

They were flown home before Pence arrived and stripped of their White House assignments pending the findings of the investigation, officials said.

Army Col. Amanda I. Azubuike, a military spokeswoman, said an investigation into the Panama case has been closed and the findings forwarded to senior military officials for review.

She said she was not aware of the final conclusions or disciplinary action.

NBC previously reported that military members on the Panama trip had been removed from White House duty.

Service members with high-level security clearances are expected to report contacts with foreign individuals to ensure that their interactions do not compromise national security.

The mission of the White House Communications Agency is to prevent eavesdropping on presidential communications and to ensure that White House officials can be securely reached worldwide at a moment’s notice.

The agency is part of the White House Military Office, a team of technical personnel traveling worldwide to support presidential trips. The communications agency employs 1,200 staffers drawn from all branches of the military. Many of its personnel are assigned to White House duties on four-year tours.

Spokesmen for Trump and Pence declined to comment and referred questions to the office of Defense Secretary Jim Mattis.

The alleged misconduct on back-to-back White House trips comes five years after a high-profile episode involving Secret Service agents on a presidential trip.

In April 2012, 13 Secret Service agents and officers were flown back to Washington from Cartagena, Colombia, after being accused of taking prostitutes back to their hotel rooms. The men were supposed to be preparing for President Barack Obama’s arrival for an economic summit in the seaside resort. Ten lost their jobs.

The scandal raised concerns that prostitutes had access to the agents’ rooms and possibly classified information about the president’s movements. The Secret Service director at the time, Mark Sullivan, testified to Congress that the episode was humiliating but said there was never a risk to the president.