WASHINGTON — An estimated 629,000 visitors to the United States — just over 1 percent of all travelers — remained in the country at the end of last year after overstaying their visas as students, workers or tourists, according to a report released on Monday by the Department of Homeland Security.

Although the figure represents a tiny portion of the estimated 50 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, had overstayed their visas.

The report, just the second issued in the last 20 years despite being required annually by law, tracked overstays by citizens of countries that require a visa and of the three dozen or so countries, mostly in Europe, that participate in the visa-waiver program, which allows their citizens to visit the United States without a visa on trips of 90 days or less.

The highest rates of overstays were from countries outside the visa-waiver program. For example, 13 percent of the visitors from Afghanistan overstayed their visas, while nearly 11 percent of those from Iraq overstayed. The highest rates of overstays were from African countries. A quarter of all visitors from Burkina Faso and Djibouti overstayed their tourist or business visa.