The leak made an entire database on Swedish drivers' licences available to technicians in the Czech Republic and Romania, with media reporting that the identities of intelligence agents may have been jeopardised.

"What has happened is an accident," Prime Minister Stefan Lofven told a news conference in Stockholm, adding that an investigation has been launched.

"It has happened in violation of the law and exposed Sweden and Swedish citizens to harm," Lofven said.

AAP

One of the largest breaches of government information in Sweden in decades, the scandal may threaten the ruling Social Democrat-led coalition as opposition parties have said they could put the issue to a confidence vote in parliament.

The leak stems from the transport agency's hiring of IBM in 2015 to take over its IT operations.

IBM in turn used subcontractors in the Czech Republic and Romania -- making the sensitive information accessible by foreign technicians.

- 'Keys to the kingdom' -

The transport agency's director general Maria Agren resigned in January for unknown reasons, but she has since confessed to violating data handling and accepted a fine of 70,000 Swedish kronor (around 7,000 euros, $8,000), according to media reports earlier this month.

The Swedish military said in a statement Saturday that information on its personnel, vehicles and defence and contingency planning could have been amongst the leaked data.

But the transport agency has denied having a register on military vehicles and added that "nothing indicates" the leaked information has been "spread in an improper way".

An official at the agency told the Dagens Nyheter newspaper that carelessness with Swedes' data was like "giving away the keys to the kingdom".

Sweden may b experiencing worst known governmental leak ever.

Worse natsec implications than Stig Bergling. PM yet to say smith@20committee pic.twitter.com/pC35aXhnae — Martin Enlund (@enlundm) July 22, 2017

Grilled by reporters on Monday, Lofven said he was told about the leak in January by his state secretary.

Defence Minister Peter Hultqvist and Interior Minister Anders Ygeman had known about it since 2016, according to several media reports.

And Infrastructure Minister Anna Johansson, who oversees the transport agency, told TT news agency on Sunday that her former state secretary had known about the leak but kept the information hidden from her -- triggering outrage among opposition parties.

"(The fact) that a responsible minister didn't know what happened within her own field provides no confidence at all," Jonas Sjostedt, leader of the Left party, told TT.

Annie Loof, leader of the Centre party, said in a statement Sunday that "a vote of no-confidence would not be excluded".