The government of Mexico lifted the alert for swine flu Tuesday, officially ending the health emergency in the country where the illness first appeared 14 months ago.

MEXICO CITY — The government of Mexico lifted the alert for swine flu Tuesday, officially ending the health emergency in the country where the illness first appeared 14 months ago.

Secretary of Health Jose Angel Cordova said that as recently as October, 90 percent of influenza cases in Mexico were swine flu. But by May, it was down to 10 percent, the rest being cases of seasonal influenza virus that is less contagious.

Swine flu has declined in recent months around the world, after 17,800 deaths in more than 200 countries. In Mexico, 72,546 infections and 1,289 fatalities have been registered since the outbreak was detected in April 2009.

Mexico’s last death from swine flu occurred in May, just over a year after the government announced to the world the presence of a new influenza virus on April 23, 2009.

The Mexican economy was hit hard by the effects of the epidemic on tourism, retailing and other industries. Cordova said direct costs associated with the outbreak totaled $355 million.