MEXICO CITY — The two Americans who were wounded when gunmen fired on an American Embassy vehicle last week were Central Intelligence Agency employees sent as part of a multiagency effort to bolster Mexican efforts to fight drug traffickers, officials said on Tuesday.

The two operatives, who were hurt on Friday, were participating in a training program that involved the Mexican Navy. They were traveling with a Mexican Navy captain in an embassy sport utility vehicle that had diplomatic license plates, heading toward a military shooting range 35 miles south of the capital when gunmen, some or all of them from the Federal Police, attacked the vehicle, Mexican officials have said.

The Mexican Navy said Tuesday in a statement that an American was driving the vehicle and that during the attack the captain, who was handling logistics and translating for the men, remained in the back seat calling for help on his cellphone.

The men were wounded, the Navy said, when the rain of bullets managed to tear through the car’s protective armor. It was unclear if the Americans, who officials said were unarmed, were specifically targeted, if the shooting was a case of mistaken identity or if there was some other reason that the vehicle was ambushed. Mexican prosecutors have detained 12 federal police officers and have said no theory can be ruled out.