The United States and UBS AG have reached an agreement in principle to settle their dispute over U.S. demands for the names of thousands of wealthy Americans suspected of using the Swiss bank to evade taxes, a U.S. Justice Department attorney said on Friday.

A final agreement, which the attorney said was expected within a week, would cap months of efforts by the U.S. authorities to roll back Switzerland's strict bank secrecy laws by forcing UBS to disclose information about its private offshore banking services.

I'm reporting to the court that the parties have reached an agreement in principle on the major issues, U.S. Justice Department attorney Stuart Gibson said in a conference call with Florida federal court Judge Alan Gold.

There are some other issues that need to get resolved, and we expect to be able to resolve them during the coming week, Gibson added.

He gave no details of the agreement, but told Gold a final signed accord could be ready in time for a pretrial status conference in the case that the judge set for Friday, August 7.

Shares of UBS were up 67 cents, or 4.9 percent, at $14.46 in morning New York Stock Exchange trading.

Speaking ahead of a meeting on Friday with her Swiss counterpart, U.S. Secretary of State Hillary Clinton also noted that an agreement had been reached in principle to settle the U.S. dispute with UBS.

There has been agreement reached in the litigation, Clinton said.

U.S. authorities are trying to force UBS to disclose the identities of as many as 52,000 U.S. holders of secret Swiss accounts suspected of dodging taxes.

In February, UBS agreed to pay $780 million to settle criminal charges it was facing under a separate, but related tax dispute. It agreed to hand over data related to around 250 U.S. clients who had secret Swiss accounts and promised to exit its offshore business to U.S. clients.

The Swiss government stretched bank laws to the limit to pass on the data without a formal violation of the nation's law, but tax lawyers said the case was a serious hit to traditional Swiss bank secrecy.

(Additional reporting by Jim Loney, Editing by Pascal Fletcher and Lisa Von Ahn)