About 38 countries participate in the visa-waiver program, including the Britain, France, Germany, South Korea and Australia. The program allows their citizens to visit the United States without a visa on trips of 90 days or less, and about 20 million tourists use it each year.

No timeline has been set for countries to carry out the changes, and officials did not say how countries would be punished if they failed to put the changes in effect. The secretary of homeland security has the authority to remove countries from the visa-waiver program.

An estimated 629,000 visitors — a little more than 1 percent of all travelers — remained in the United States at the end of last year after overstaying their visas as students, workers or tourists, according to the Department of Homeland Security.

Although the figure represents a small portion of the estimated 20 million visitors to the country, homeland security officials say the failure of some people to leave when their visas lapse presents a national security risk. Two of the Sept. 11 hijackers, Satam al-Suqami and Nawaq Alhazmi, overstayed their visas.

Only countries that have overstay rates of 2 percent or more will be required to begin an education campaign. Four meet that threshold: Hungary, Greece, Portugal and San Marino, a tiny country surrounded by Italy.