Mexican officials, although they had given me a valid visa, stopped me and told me that I couldn't enter the country because a foreign government had placed a travel alert on my passport, designating me as a national security risk.