MEXICO CITY — The federal police officers who shot up an American Embassy vehicle on Friday, wounding two American law-enforcement workers, were detained on Monday as prosecutors determine whether they abused their authority or committed other crimes, Mexican officials said.

The 12 officers were ordered held for at least 40 days while investigators sort out what the embassy called an “ambush.” Gunmen in a group of cars accosted the Americans 35 miles south of the capital as they rode with a Mexican Navy captain to a military training installation in an embassy sport utility vehicle with diplomatic plates.

The embassy has refused to identify the Americans or say which agency employs them.

The Mexican Navy said in a statement that the assailants included federal police officers who were tracking criminals in the area, and Mexican newspapers have reported that all of the shots fired came from the police.

Officials in the federal prosecutor’s office said investigators had sought the detention order because of the possibility that the officers had committed a range of crimes, including abuse of authority and attempted murder, though whether the officers would be prosecuted had not been determined.