Mexican prosecutors said Sunday that they have detained a U.S. citizen as the main suspect in the shooting of an official at the U.S. consulate in the western city of Guadalajara.



The federal Attorney General's Office said that "a U.S. citizen was identified and detained for his presumed involvement in the case. This person will be deported to the United States, to determine his legal situation."



The office expressed its "deep dismay at this cowardly attack" and said the victim remained hospitalized in stable condition.



The identity of the suspect was not released, and authorities did not comment on a possible motive for the attack.



U.S. Secretary of State John Kerry issued a statement thanking Mexico for the quick arrest.



"On behalf of President Obama and the people of the United States, I want to thank the Government of Mexico for their swift and decisive arrest of a suspect in the heinous attack against our Foreign Service Officer colleague," Kerry said. "My thoughts and prayers remain with this officer and his family during this difficult time. I wish him a speedy recovery."



The U.S. Embassy has not identified the official who was shot in his car Friday in Guadalajara. Local media identified him as Christopher Ashcraft, whose profile on social networking sites listed him as a consular officer in Guadalajara since 2016.



The FBI had offered a $20,000 reward for information on the attacker, and surveillance cameras photos of him had been widely circulated.



Jalisco state is dominated by the hyper-violent Jalisco New Generation cartel. There was no immediate evidence of any cartel link to the attack.



The U.S. Embassy in Mexico City urged citizens to limit their movements in the Guadalajara area. "They should also take care not to fall into predictable patterns for those movements that are essential," the statement continued. "They should vary the times and routes of their movements."



It was unclear if that was a reference to the apparent stalking of the U.S. consular employee by the gunman, and what appeared to be a direct attempt to kill him.



Surveillance video of the attack shows the gunman following the official in a parking garage. The official was dressed in shorts. The attacker doesn't appear to try to approach the official while he is walking, but instead waits for him to exit the parking garage in his vehicle and fires a round into the car's windshield.



U.S. consular employees and other U.S. agents have been attacked in Mexico in the past. The attackers have usually argued the attacks were cases of mistaken identity.