Swiss lawmakers have given final approval to a deal with the United States that allows Swiss banking giant UBS to give Washington data on thousands of suspected U.S. tax cheats.

The two houses of parliament also agreed ahead of Thursday's vote not to stage a public referendum on the measure. It allows UBS to provide the names of 4,450 U.S. clients suspected of hiding income to avoid paying U.S. taxes.

UBS has been under intense U.S. pressure since 2007, and the bank cut the deal last year to end a U.S. lawsuit. But the agreement needed parliamentary approval after the Swiss Supreme Court later ruled it violated Swiss secrecy rules.

The legislation comes just one week after two key Swiss political parties joined forces to block the measure in the lower house of parliament. But that opposition largely evaporated ahead of this week's votes in both houses.

A public referendum would have made Switzerland miss an August deadline to hand over the names, because the vote would not have taken place until November.

Some information for this report was provided by AP, AFP and Reuters.