Spanish Health Minister Trinidad Jimenez said a 23-year-old Spanish man who recently returned from Mexico started showing symptoms of the virus on Saturday and was later hospitalized in Almansa in southeast Spain.
The minister said another 20 other people in Spain are suspected of infection with the virus.
Authorities around the world have begun closely monitoring incoming flights from Mexico, checking passengers for signs of infection with the virus, which is believed to have claimed more than 100 lives in Mexico.
Twenty human cases of swine flu have been confirmed in the United States and six in Canada, and suspected infections have been reported in New Zealand, Israel and France. The United States has declared a public health emergency.
A 31-year-old Italian woman was hospitalized in Venice on Monday with swine flu symptoms. She had flown in a few days previously from California, where several swine flu cases have been confirmed.
World Health Organization Director General Margaret Chan warned on Sunday that the outbreak had "pandemic potential", and urged governments to improve measures to monitor the virus.
Swine influenza is a highly contagious respiratory disease of pigs caused by one of several viruses. Although swine flu viruses are normally species-specific and infect only pigs, they sometimes cause disease in humans.
According to the WHO, the human mortality rate from swine influenza is between 1% and 4%. The virus often goes undetected, as the symptoms are similar to those of ordinary flu.
However, the WHO said on its website that cooked pork products do not pose a health risk.
"Swine influenza has not been shown to be transmissible to people through eating properly handled and prepared pork (pig meat) or other products derived from pigs. The swine influenza virus is killed by cooking temperatures of 160F/70C."