Rep. Jim Matheson, a Democrat, voted to keep the program, even though a majority of Democrats, 111, went the other way.
President Barack Obama and House Republican leaders supported the NSA program, which relies on the Patriot Act as its legal justification to gather "telephony metadata."
That massive trove of information doesn't include the content of conversations, but does include information on all numbers dialed, duration of calls and potentially the location. Agents can use the information to identify a suspect's friends and associates.
It's possible that some of this data, which the NSA has gathered for the past seven years, could eventually be stored in the Utah Data Center, a 1 million square foot, facility that the agency will open later this year.
The state's federal delegation has supported that project even when they have reacted skeptically to some of the NSA's security tools.
Chaffetz believes the government's collection of metadata "goes too far."
"To say we are going to track everyone in the name of security doesn't work for me," he said in explaining his vote.
He called the cross-party debate a "classic tug of war" between personal freedoms and national security, and he thinks the NSA's collection of metadata on all domestic calls is "untenable."
Rep. John Conyers, D-Mich., said the amendment wouldn't stop legitimate investigations but would "curtail the ongoing dragnet collection and storage of the personal records of innocent Americans."
The leaders of the House Intelligence Committee defended the program as "a vital tool" to protect the nation. Chairman Mike Rogers, R-Mich., said the metadata, along with another NSA program that allows agents broad access to online information, has helped thwart 54 terrorist attacks.
"This is not a game," he said. "This is real and it will have real impacts."
He also argued that the program is regularly reviewed by the courts, the executive branch and Congress.
Utah's Matheson was among the lawmakers who tied his vote against the amendment to the Sept. 11, 2011, terrorist attacks, noting he was in Washington at that time.
He also criticized adding the amendment to a defense spending bill, which the House eventually approved Wednesday.
"I don't support a ham-handed amendment that bypassed congressional hearings and had just 10 minutes of debate as an appropriate way to address critical national security issues," Matheson said.
House Speaker John Boehner agreed to allow the vote when Amash and a group of libertarian-leaning members threatened to derail the defense legislation. In reaction, the White House and the NSA quickly reacted to defend the program. Gen. Keith Alexander, who leads the NSA, held a private briefing with lawmakers to assuage their concerns.
Boehner opposed the amendment and just minutes after it failed, the House passed the Defense spending bill, 315-109. All four of Utah's House members supported it.