By Johan Ahlander and Helena Soderpalm
STOCKHOLM (Reuters) - Swedish Prime Minister Stefan Lofven replaced two ministers on Thursday in a scandal over the leaking of sensitive data, trying to avoid the more drastic option of calling an early election.
Faced with a political crisis over a botched IT outsourcing deal, Lofven sacrificed his interior and infrastructure ministers rather than hold a snap vote more than a year ahead of schedule.
But he retained his defense minister, defying opposition parties who had pressed for the removal of all three ministers.
"I have to take responsibility for the country. It wouldn't serve Sweden to throw the country into a political crisis," Lofven told a news conference, citing the many challenges Sweden and the European Union were facing, including Brexit.
The opposition Christian Democrats and far-right Sweden Democrats said, however, they would press ahead with a no confidence vote in Defence Minister Peter Hultqvist.
If they win that vote, it could yet bring down Lofven's minority left-green government and force him to resign or call an early election.
"I will handle that if and when it happens," Lofven said, referring to the confidence motion, saying the opposition should think hard about going ahead with it.
"It is important for the members of parliament that are going to push the button ... that this is the responsibility they have taken upon themselves."
The parties' options are constrained by the fact that the nationalist, anti-immigrant Sweden Democrats have held the balance of power in parliament since 2010. Other parties refuse to work with them, but are unable to form majority governments without them.
The scandal involves the handling of data under a 2015 outsourcing deal between the Swedish Transport Agency and IBM Sweden. Lofven admitted on Monday that his country and its citizens had been exposed to risks by potential leaks of sensitive information.
Among some of the details that could have been accessible outside Sweden were the registration numbers of most vehicles on land, air and sea in Sweden.
Whistleblowers have raised concerns that information about vehicles used by the armed forces and the police may have ended up in the wrong hands. The identities of some security and military personnel could also have been at risk, according to reports.
Magnus Hagevi, professor of political science at Linnaeus University, said the prime minister, in reshuffling his cabinet, had gone for a "middle option" to try and keep his government in place.
"What was unexpected was that Hultqvist remained in his position. That means this is not over in any way, we need to wait and see how the party leaders of the (opposition) Alliance will act," he told Reuters.
The Swedish crown was unperturbed, trading largely unchanged against the euro after initially strengthening somewhat.
"Financial markets have taken this in stride, and I think that will continue also going forward," said Robert Berqvist, SEB chief economist.
"The combination of a strong Swedish economy, a strong balance sheet, and the economic-political framework gives us protection against these political events. But there could possibly be somewhat more nervousness in the financial markets if problems around the state budget arise, so we need to keep an eye on that."
Sweden has enjoyed an economic boom most countries in Europe would envy. Gross domestic product grew by 3.2 percent last year and is predicted to grow by 2.4 percent this year.
(Additional reporting by Johannes Hellstrom in Stockholm, writing by Gwladys Fouche; Editing by Mark Trevelyan)