Swedish Prime Minister Stefan Lofven accepted the resignation of two cabinet members on Thursday, but refused to fire Defense Minister Peter Hultqvist. An alliance of opposition parties has nevertheless vowed to press for a no-confidence vote unless Hultqvist is removed from office as well. All three ministers came under fire for their roles in a botched outsourcing deal that led to one of the largest security breaches in the country's history.

Prime Minister Stefan Lofven rejected calls to replace Hultqvist after accepting the resignations of his interior and infrastructure ministers to avoid calling snap elections more than a year before the country's next scheduled vote. Hultqvist himself said he didn't think he needed to resign, saying it "was up to others" to decide if they wanted to press for a vote to remove him.

At a news conference Thursday, Lofven announced: "I have to take responsibility for the country. It wouldn't serve Sweden to throw the country into a political crisis." He also said that Hultqvist was "widely respected" and that the defense ministry was not ultimately responsible for the scandal.

Swedish Prime Minister Lofven (r), Defense Minister Hultqvist (2nd from r) says he's staying, while Thomas Eneroth and Helene Fritzon replace the casualties.

Attack from the right

On Wednesday, an alliance of right-wing opposition parties announced their intention to call the no-confidence vote following reports last week that unvetted foreign IT workers were granted access to confidential information in Sweden's government and police database in 2015. The security breach arose when the Transport Agency outsourced some of its services to IBM in the Czech Republic.

The foreign IT specialists lacked security clearance but had access to data such as driving licenses and vehicles, including individuals with protected identities.

Read more: German police ready to hack WhatsApp messages

"Several ministers have neglected their duties. This must have repercussions," Annie Loof, leader of the opposition Center Party, told reporters, flanked by the leaders of the conservatives, Liberals and Christian Democrats.

When the head of the anti-immigrant Sweden Democrats said his party would back the no-confidence vote, it gave the vote the required majority to oust the ministers of defense, interior and infrastructure.

"There are only two alternatives, either a new election or he himself (Lofven) resigns," Sweden Democrats leader Jimmie Akesson said. On Thursday Akesson tweeted that his party stood by its demand that the defense minister be removed and also by its belief that the government should resign.

Opposition parties criticized the minority left-wing government for failing to inform them of the breach despite the defense minister and the interior minister knowing about it in early 2016. Infrastructure Minister Anna Johannson was in their sights for failing to oversee the Transport Agency.

Lofven says he was not told immediately

Lofven said the two ministers also failed to inform him about it, saying that he had only learned of the breach in January this year. He labeled the Transport Agency's actions "a disaster."

Johannson, who cited her failure to oversee the Transport Agency as grounds for her resignation, has now been replaced by Social Democratic parliamentary group leader Tomas Eneroth. Outgoing Interior Minister Anders Ygeman will now take up the parliamentary group leader post and his ministry will be merged into the portfolio of Justice Minister Morgan Johannson, whom the prime minister called "one of the cabinet's most experienced members."

Prime Minister Lofven made other cabinet changes as well in attempt to preserve his minority government, which has been in power since 2014. The Social Democrats currently hold 138 seats in Sweden's 349 seat legislature. The country's four center-right parties and the Sweden Democrats have said that they will press on with the no-confidence vote after the summer recess.

js, aw/msh (Reuters, AP, dpa)