WASHINGTON — An investigation is under way to determine whether any classified information was compromised when U.S. Secret Service agents consorted with prostitutes in Colombia before a summit attended by President Obama, according to two U.S. officials.

Authorities are checking identities of the women and whether they may have been recruited by a foreign intelligence service or a group with hostile intentions, said the officials, speaking on condition of anonymity because the inquiry is confidential.

Obama retains confidence in Mark Sullivan, the director of the Secret Service, White House press secretary Jay Carney said Tuesday.

Sullivan “acted swiftly” when accusations were made that as many as 11 agents were involved with prostitutes in the resort city of Cartagena before Obama’s arrival for the Summit of the Americas, Carney told reporters in Washington. “The Secret Service performs admirably” in protecting the president, Carney said.

Obama’s agenda at the summit on the economy, trade and engagement in Latin America, which concluded Sunday, was overshadowed by the reports of misconduct among U.S. personnel.

The allegations, which prompted the recall of 11 Secret Service agents to the United States before the president arrived, also involved 10 members of the military who were in Cartagena as part of the summit preparations. The Pentagon is conducting its own inquiry.

Sullivan has asked the inspector general of the Department of Homeland Security, the Secret Service’s parent agency, to begin a probe as well, said Sen. Charles Grassley, R-Iowa. Marty Metelko, a spokeswoman for the inspector general’s office, declined to comment.

Investigators haven’t discovered that any of the women had ties to any hostile groups or governments, said House Homeland Security Committee Chairman Peter King, R-N.Y., in an interview. King said he was briefed by the Secret Service on the probe.

The 11 Secret Service employees are being investigated for participating in the incident with 11 women, King said. Some of the Secret Service employees have told investigators the women were prostitutes while others have said they were companions and met at a bar, he said.

Most of the employees are special agents and at least two were uniformed officers, King said. All were part of an advance team that specialized in spotting snipers and dealing with explosives, he said.

The military personnel were two Marine Corps dog handlers, five Army special forces members, two Navy explosives detection specialists and a member of the Air Force, according to a U.S. official, who wasn’t authorized to speak on the record.

At one point, the women felt outnumbered in the hotel rooms and requested that more women join them, Rep. Mike McCaul, R-Texas, said in an interview. McCaul, chairman of the House Homeland Security Subcommittee on Oversight, Investigations and Management, also said he was briefed on the investigation.

One Secret Service employee got into an argument with a woman over the price for her services, and the Colombian police were called, King said. After the employee paid the woman, the police, who routinely report any incident involving a foreign national, contacted the U.S. embassy, he said.

Prostitution is legal in designated areas of Colombia, according to the U.S. State Department.

At a news conference before leaving Cartagena, Obama said he would await the outcome of a “thorough” investigation.

Susan Collins of Maine, the top Republican on the Senate Homeland Security and Governmental Affairs Committee, told reporters she will ask Sullivan whether such incidents had occurred previously and wants the committee to hold a hearing on the episode.

“I find this to be so appalling,” Collins said. “I can’t help but think: What if the women involved had been spies? What if they’d been members of the drug cartel? What if they’d planted equipment or eavesdropping devices?”

The Senate Judiciary Committee, which oversees the Secret Service’s budget, has also requested details about the incident, according to a panel staff member who spoke on condition of anonymity because the committee hasn’t commented on the incident.