The foreign ministry said the Mexican ambassador to Egypt visited five other nationals being treated at the Dar al Fouad Hospital in a western Cairo suburb, where they were listed in stable condition.
Read: Egyptian forces chasing militants kill Mexican tourists in error
Egypt's interior ministry said security forces killed 12 people and wounded 10 others, including Mexicans and Egyptians, who were traveling in four pickup trucks in the Western Desert.
It did not indicate how many Mexicans were hit and said they had been in an area "off limits to foreign tourists."
The Egyptian authorities did not indicate whether the tourists were killed by automatic fire or aerial bombardment.
"Mexico condemns these incidents against our citizens and has demanded an exhaustive investigation about what happened from the government of Egypt," President Enrique Pena Nieto said on Twitter.
Pena Nieto said he ordered his foreign ministry to deploy more diplomats to Egypt to assist the victims and their families.
"For the moment, we regrettably confirm the death of two Mexican nationals in this incident," Mexico's foreign ministry said in a statement, adding that it was working on identifying them.
The foreign ministry gave few details about what happened, describing it only as a "grave incident" in which an "undetermined" number of Mexican tourists were attacked "in circumstances that are still not clear."
Foreign Minister Claudia Ruiz Massieu is scheduled to give a press conference about the incident on Monday at 1245 GMT.
Ruiz Massieu dispatched to Egypt the director of her ministry's office for the protection of Mexicans abroad, as well as personnel from other embassies in the region.
The ministry statement said she urged Egyptian authorities to help the Mexican tourists who are being taken to Cairo.
The embassy and foreign ministry "remain on alert to know the situation of other Mexicans affected," the statement said, adding that the government was in contact with families of the tourists.
Read: Egypt's Sisi imposes tough anti-terrorism law
The vast desert region, popular with tourists for its oases and rock formations, is also a militant hideout.
Last month, the Egyptian branch of the Islamic State group beheaded a young Croatian there who was working for a French company and have also launched numerous attacks against security forces.
The Islamic State group in Egypt said in a statement that it had "resisted a military operation in the Western Desert."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ