New concern was focused on that security loophole last week, when Hosam Maher Husein Smadi, a 19-year-old Jordanian who had overstayed his tourist visa, was accused in court of plotting to blow up a Dallas skyscraper.

Last year alone, 2.9 million foreign visitors on temporary visas like Mr. Smadi’s checked in to the country but never officially checked out, immigration officials said. While officials say they have no way to confirm it, they suspect that several hundred thousand of them overstayed their visas.

Over all, the officials said, about 40 percent of the estimated 11 million illegal immigrants in the United States came on legal visas and overstayed.