The Army and Air Force have punished U.S. service members who were sent home from Vice President Pence’s trip to Panama last year after bringing foreign women into a secure area without registering them, but they will not court-martial them, U.S. military officials said.

The Army elected to issue general officer memorandums of reprimand to the three soldiers involved, said Adrienne M. Combs, an Army spokeswoman. The reprimands will not have an immediate impact on the soldiers’ careers but can affect their chances of promotion, reenlistment or retirement, she said.

The Air Force also administratively punished at least one airman who was involved, said Ann Stefanek, a service spokeswoman. She declined to provide specifics about the nature of the punishment, citing the airman’s right to privacy.

“Behavior of this nature is absolutely unacceptable and is completely contrary to our core values in the United States Air Force,” she said.

The services’ handling of the issue administratively effectively limits public information about the cases, including the service members’ names and additional specifics about what happened. The decision appears to bring to a close an embarrassing incident for the White House Communications Agency, a military unit that provides secure communications equipment for the president, the vice president, the Secret Service and other officials while they are traveling outside Washington.

The troops, all enlisted, noncommissioned officers, were sent home before Pence arrived in Panama and stripped of their White House assignments pending the results of an investigation.

Combs said the Army is still investigating a second incident that took place in Vietnam as U.S. troops prepared for President Trump’s arrival there in November. In that case, three noncommissioned officers in the Army broke curfew in an incident involving foreign women, officials familiar with the situation said. Combs said an investigating officer with the Army’s Military District of Washington should complete his report by the end of the month for more senior officers to review.

The White House Communications Agency is part of the larger White House Military Office and has the duty of preventing surveillance of presidential communications and ensuring that White House officials can be reached securely at all times while traveling. The communications agency has about 1,200 staff members drawn from all branches of the military, with many in four-year assignments.

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 misconduct on back-to-back White House trips last year came five years after an incident that led to 10 Secret Service members losing their jobs for behavior in Cartagena, Colombia. In that case, they were accused of taking prostitutes to hotel rooms in April 2012 while preparing for President Barack Obama’s arrival for an economic summit.

Carol D. Leonnig contributed to this report.