At least 12 people were killed and 10 injured in Egypt's southwestern desert Sunday when security forces mistakenly fired on a group of Mexican tourists, Egyptian officials said.

The Mexican Foreign Ministry confirmed the incident and said at least two of the dead were Mexican nationals. It said in a statement that the victims were still being identified, and Foreign Ministry personnel were working with the families of the victims.

Mexican President Enrique Pena Nieto posted a statement on his Twitter feed Monday morning saying his government "condemns these acts against our citizens" and demanding a thorough investigation.

A joint military-police force was pursuing "terrorist elements" in the area and fired on four cars that turned out to be carrying tourists, according to Egypt's Interior Ministry. The ministry said the victims were Egyptian and Mexican.

Egyptian officials claim the safari convoy had wandered into a restricted area of the western desert. The tour company involved "did not have permits and did not inform authorities," Rasha Azazi, a spokesperson for the Egyptian Ministry of Tourism, told The Associated Press, adding that any trips to that area are required to be cleared by officials.

"They were not supposed to be there," she said, but could not provide further information on the circumstances of the shooting.

Mexican Foreign Minister Claudia Ruiz Massieu was in contact with Egypt's ambassador to Mexico and also demanded an investigation and explanation of what happened, the Mexican statement said. She also demanded the support of Egyptian authorities for Mexican nationals being transported to Cairo.

Jorge Alvarez Fuentes, Mexico's ambassador to Egypt, and consular representatives visited the wounded at the Dar el-Fouad Hospital in suburban Cairo, and Fuentes had interviewed five survivors, the Foreign Ministry statement said. It did not provide details on the survivors' accounts of the incident.

Egypt's western desert is popular among safari enthusiasts, but has not been known as a hotbed of militant or insurgent activity. Police and military there have primarily been concerned with combating smuggling along Egypt's large and porous border with Libya.

Cairo has been battling an Islamic insurgency on its eastern flank in the Sinai peninsula for years; attacks targeting army and police in Sinai escalated and spread to the mainland after the July 2013 military ouster of Islamist President Mohammed Morsi.