STOCKHOLM, Sweden (AP) _ Sweden's justice minister resigned Monday and accepted blame for the escape of a convicted spy who was left unguarded on a conjugal leave.

Sten Wickbom said the public furor over the Oct. 5 escape of Stig Bergling prevented him from doing his job.

Bergling was convicted of selling defense secrets to the Soviet Union. His spying forced Sweden to revamp much of its defense system after his capture in 1979.

Wickbom, 56, a former judge who held the Cabinet post since 1983, blamed himself for not being apprised of vital information that might have warned him Berling could escape.

The nation's security forces have received heavy criticism since the investigation into the 1986 assassination of Swedish Premier Olof Palme.

Prime Minister Ingvar Carlsson said he had not demanded the resignation, but agreed Wickbom had become hamstrung by the scandal.

''It is extraordinarly difficult to be minister of justice in a country where the premier is killed,'' Carlsson said.

Carlsson appointed Anna-Greta Leijon, 48, the Labor Market minister, to replace Wickbom.

Bergling, 50, was allowed to spend the night with his wife while his guard slept at a nearby hotel. The practice of unguarded conjugal visits is common except for dangerous criminals, but Bergling was under heavy surveillance in previous visits home.

A parliamentary inquiry, in a report issued Monday, exonerated the police and put full operational blame on the National Prisons Board, which approved the easy conditions of Bergling's leave. It said disciplinary action will be taken against department head Clas Amilton.

Bergling, who was serving a life sentence, stole documents when he served as an officer in the coastal artillery, a branch of the army, and later in the intelligence units of both the police and the defense department, the inquiry said.

The report was not specific, but newspaper accounts said he gave the Soviets information on Swedish coastal defenses and other military installations, and on the organization of key defense units.

Wickbom told reporters his department had known in September that Bergling would be given a conjugal leave with minimum security.

He blamed himself for not finding out about the prison authorities' plans, although he refused to say whether he would have intervened.

By July, the guard against Bergling was reduced to virtually nothing. But Bergling was still considered dangerous enough for the security police to ask the prison board to reject his parole application in August.