Though the move comes amid a row over Tehran's nuclear policy, Serge Steiner, a spokesman for the Swiss bank, said that the decision was solely driven by dwindling business prospects in Iran.
"We started to exit customer relationships with counterparties in Iran in autumn last year," Steiner said.
He said high costs deriving from uncertainty about security and regulatory matters made business no longer worthwhile in Iran.
UBS is the world's largest asset manager and its decision will be closely watched by rivals.
"This holds true for all our business units and for all UBS's regions around the world," he said.
Spectre of sanctions
Iran faces referral to the UN Security Council for possible sanctions, after failing to convince the world that its atomic programme is peaceful, and the country said on Friday that it was moving foreign holdings out of Europe.
However, on Sunday Iran's foreign ministry denied that any currency had been transferred to shield funds from possible UN sanctions, contradicting previous statements from Ebrahim Sheibani, the governor of the central bank.
Credit Suisse, Switzerland's second-biggest bank, also indicated on Sunday that it was considering terminating relationships with Iran.
"We are closely looking at the developments and we're increasingly worried," a spokesman said.
Iranian clients hold 1.4 billion Swiss francs ($1.09 billion) in assets in Swiss banks, according to central bank data. Most of that money is with UBS and Credit Suisse.
UBS and Credit Suisse had declined to comment on Friday about their relationships with clients in Iran.
Separately, a source close to UBS said it was also severing relationships with clients in Syria, which was blamed by the UN for the killing of a former Lebanese premier. UBS declined to comment.
UBS's Steiner said that the decision to pull out of Iran had been made after finding that high compliance costs were not likely to be outweighed by benefits it expected from business with clients in the country.
But he rejected the idea that the world's sixth-largest bank had made the decision in order to protect ties with the United States, where it does a huge part of its business and which is one of Tehran's fiercest opponents.
"It's not a political decision. It's purely a business decision that is taking many factors into account," he said.
Switzerland hosts the world's largest wealth-management industry for foreign clients and is considered a safe haven for clients in countries where political or regulatory instability makes putting their money into a local bank too risky.