STOCKHOLM (Reuters) - Sweden said on Tuesday it will cancel a defense agreement with Saudi Arabia worth billions of crowns to its industry after criticism of Riyadh’s human rights record sparked a diplomatic row.

Sweden’s Social Democrat-led government, which came to power in October last year, has focused its foreign policy on human rights. But its more vocal stance has put it at odds with industry -- Sweden is the world’s 12th biggest arms exporter -- and the coalition government itself has been divided on whether to renew the Saudi Arabia deal.

“The decision on the Saudi agreement had been made some time ago,” the newspaper Dagens Nyheter quoted Prime Minister Stefan Lofven as saying in the Ukrainian capital Kiev. “What has happened in recent days hasn’t been decisive.”

On Monday, Saudi Arabia blocked Swedish Foreign Minister Margot Wallstrom from giving a speech to the League of Arab States in Cairo. A spokesman for Wallstrom said the decision stemmed from Sweden’s criticism of Saudi Arabia’s human rights record.

The Arab League later agreed a resolution denouncing remarks by Wallstrom to the Swedish parliament, the Saudi Press Agency reported.

In February, Wallstrom told parliament Saudi Arabia violated women’s rights and criticized the flogging of human rights activist and blogger Raif Badawi. She also called Saudi Arabia a “dictatorship.”

The canceled agreement, which includes military systems, training and transfers of technology, netted 4.8 billion crowns ($561 million) in 2011-2014.

Sebastian Carlsson, press officer at Saab said other regulation controlled the company’s exports, not the agreement.

“Saudi Arabia is a very important market for us and a good customer,” he said. “How Sweden handles this can affect us.”

Saab does not publish any data on how much it sells to Saudi Arabia or any other country outside Sweden.

The deal was first signed in 2005 by a previous Social Democratic government and was renewed by a center-right government in 2010.

The Green Party, junior partner in the current coalition, had called for the accord to be scrapped.

But Swedish industry leaders had lobbied hard for an extension, arguing Sweden’s reputation as a trade partner was on the line.

Cancellation could affect not only defense firms but companies outside the military sector, 31 business leaders said in an open letter published on Friday in the newspaper Dagens Nyheter. They included fashion retailer H&M’s main owner, Stefan Persson, and Investor Chairman Jacob Wallenberg.

Ulf Bjereld, a professor of political science at Gothenburg University, said the cancellation of the deal could lead to Sweden being isolated in world politics.

“But it can also strengthen Sweden’s role in that we treat everyone equally and we stand up for human rights,” he said.