Sweden's Prime Minister, Stefan Lofven, says his minority government will not resign despite a security crisis over the handling of sensitive public data.
He said two ministers would leave their posts, rejecting calls for a snap election.
Citing Brexit and security he said "I won't put Sweden in political crisis."
Meanwhile, the main opposition bloc said a vote of no confidence in a third minister would go ahead after the parliament recess.
For weeks, the government has been dogged by revelations of a glaring security breach involving an IT contract. Mr Lofven himself said earlier this week: "This is a disaster. This has exposed Sweden and Swedish citizens to risks."
He said two ministers were stepping down - Anna Johansson (Infrastructure) and Anders Ygeman (Interior). But Defence Minister Peter Hultqvist, who was also under pressure, has survived.
The four parties that make up the opposition Alliance bloc said they would press ahead with a vote of no confidence in Mr Hultqvist, but would not seek an emergency recall of parliament from its summer recess.
What went wrong?
The crisis dates back two years to an IT contract that left public data in foreign hands but only this month has mushroomed into a security debacle with serious questions about the role of high-profile ministers.
In 2015, Sweden's Transport Agency, Transportstyrelsen, awarded its IT maintenance contract to IBM, which then gave the work to subcontractors in the Czech Republic and Serbia.
It was a scandal that involved "giving away the keys to the kingdom", in the words of a Transport Agency IT worker when interviewed by Sweden's Sapo security service.
The decision was made by the agency's then director general, Maria Agren, even though Sapo had advised her not to. She ignored three key security laws - the National Security Act, the Personal Data Act and the Publicity and Privacy Act.
Why was it "a disaster"?
The security service says it meant foreign nationals without proper security clearance had access to data about Swedish driving licences as well as the country's transport infrastructure.
IBM Sweden has declined to comment but there is no suggestion of wrongdoing by the company.
The first indication to the public that something had gone wrong came only in January 2017. Maria Agren was sacked and later fined a reported 70,000 Swedish kronor ($8,000; £6,000) for her conduct.
But the reason for her losing her job has only recently emerged. Swedish reports said it was for gross negligence for handing over confidential information to foreign sources and risking Sweden's security.
What risk was there for Swedish security?
It is not really clear, as Sapo has not said. But the reports are worrying and there are claims the security of the nation was placed in jeopardy.
One report said three Czech IT workers had access to two police databases used for checking driving licence applications.
That data may have included details of suspected criminals, witnesses in sensitive criminal cases, and women living under the threat of death from a former partner. It may also have included details of military and police vehicles.
The Transport Agency has admitted holding information about people with "protected identities" but insists it does not hold a register of military pilots, airports or aircraft.
It has also said: "We have no indications indicating that data was disseminated improperly, so we do not see any direct cause for concern."
Analysis: A shrewd move or clinging to power?
Maddy Savage, Stockholm
After weeks of political upset, with ministers and opposition leaders dramatically recalled from their long holidays, the prime minister has sought to salvage his government, rather than call a snap election or allow the nation's opposition parties to put together an alternative.
Mr Lofven says the government has to stay focused on core issues, in the aftermath of April's truck attack in Stockholm, and as the UK leaves the European Union.
Some here see it as a shrewd move that will reassure voters while offering an olive branch to the opposition by removing two of the three ministers linked to the IT scandal. Others see a government clinging on to power by a very weak thread that could yet break before elections due in September 2018.
Either way, the biggest government security breach in years is a major embarrassment for Sweden, which is has a reputation as one of the world's most digital and tech-savvy nations.