On July 8, 2010, Immigration and Customs Enforcement investigators in New York created an alert, known as a TECS lookout, for Mr. House, noting that he was “wanted for questioning re leak of classified material” and ordering border agents to “secure digital media” if he appeared at an inspection point.

TECS is a computer system used to screen travelers at the border, and includes records from law enforcement, immigration and antiterrorism databases. A report from the Department of Homeland Security about border searches of electronic devices says a traveler may be searched “because he is the subject of, or person-of-interest-in, an ongoing law enforcement investigation and was flagged by a law enforcement ‘lookout’ ” in the Immigration and Customs Enforcement computer system.

On Oct. 26, 2010, an automated message notified investigators that Mr. House had an airline reservation on Oct. 30, traveling on American Airlines flight 865 from Dallas-Fort Worth to Los Cabos, Mexico; a later query noted that he would be returning to Chicago O’Hare on American flight 228, landing at 6 p.m. on Nov. 3.

Since airline passengers are required to provide carriers with their birth date and passport number before a flight to or from the United States, and airlines pass that information to Homeland Security (as part of the Advance Passenger Information System), computers matched the lookout alert with Mr. House’s itinerary. Agents were then dispatched to meet him.

“It is clear from these documents that the search of David House’s computers had nothing to do with protecting the border or with enforcing immigration laws,” said Catherine Crump, a lawyer with the American Civil Liberties Union, which represented Mr. House along with the A.C.L.U. of Massachusetts. “The government used its broader powers at the border to conduct a search of House’s devices that no court would have approved.”

The documents, released by the A.C.L.U. on Monday, also detail the extent of the government’s examination of Mr. House’s computer. After a search using 183 keywords that turned up more than 26,000 files, the investigation concluded that “no data was found that constituted evidence of a crime.”

As part of the settlement, the government agreed to destroy all copies of the data taken from Mr. House, and update his file so he will not automatically be detained when he returns to the United States after traveling abroad, which has happened repeatedly since 2010.