The Swiss parliament approved a treaty Tuesday with the United States that will hand thousands of files on suspected tax cheats to U.S. authorities, but obstacles remain that could delay the deal for several more months.

The government hopes the agreement will eventually end a three-year battle between UBS and the Internal Revenue Service that culminated in revelations the bank had for years helped U.S. clients hide millions of dollars in offshore accounts.