Switzerland’s effort to end a tax-evasion dispute with Washington hit a major setback Tuesday when lawmakers blocked a treaty that would have seen the largest Swiss bank give U.S. authorities files on thousands of American clients.

The Swiss government and Washington had painstakingly crafted the treaty last August to resolve a long-standing dispute over UBS AG’s alleged role in aiding tax evasion, but 104 nationalist and left-wing lawmakers in Switzerland’s lower house, the National Council, voted against the deal, compared to 76 in favor, after their demanded amendments were refused. Sixteen lawmakers abstained.