Israeli pharmaceutical company Teva said Monday that it would return tens billions of shekels to Israel from abroad, and pay a tax bill of nearly three billion shekels.

The money, which are profits from Teva operations in Israel and abroad, were being held in company accounts abroad, as the company held out for a better tax deal. Teva's worldwide profits are subject to Israeli taxes, but that money can only be taxed when it is deposited in Israeli accounts, owned by the Israel-registered Teva corporation. As long as the money was abroad, Teva in Israel did not have to pay taxes on it – but neither could it bring the money back home.

Issues with “captive profits,” as the money is known, are common with large corporations all over the world. In order to pay less in taxes, a company will often leave money in banks abroad, refusing to bring it to their home country unless they get tax breaks.

According to Israeli tax law, Teva owed the state tens of billions of shekels in taxes for the money it has abroad, which represents nearly a decade of profits. In order to close the books on the matter, the government offered Teva a deal whereby it would pay only 5% of the captive profits in taxes. The deal was to expire at midnight Monday.

Finance Minister Yair Lapid praised Teva for its decision. “This agreement will net the state NIS 2.84 billion.” Collecting the taxes, said Lapid, “was one of the missions I had set for myself and the Tax Authority. We will continue to carry out a determined policy to create a balance between the creation of jobs and the collection of taxes by all companies in Israel.”