By Joachim Dagenborg and Gwladys Fouche
OSLO (Reuters) - Norwegian Justice Minister Sylvi Listhaug quit on Tuesday to avert a collapse of the minority government after she caused uproar with comments accusing the opposition of being too lenient on terrorism suspects.
Listhaug had been poised to lose a vote of confidence in parliament later on Tuesday over her Facebook postings that could have toppled the government. Her decision to resign defused Norway's worst political crisis in years.
"The choice (to resign) was mine alone, and I've done what I believe was right," Listhaug told a news conference, adding that the process had been "a witch hunt" against her.
Listhaug, of the Progress Party, provoked outrage earlier this month after she accused the opposition Labour Party of putting "terrorists' rights" before national security, a particularly sensitive topic for Labour which was hit in 2011 by a mass shooting by far right militant Anders Behring Breivik.
Listhaug made her comments after Labour and the Christian Democrats helped defeat a bill allowing the state the right, without judicial review, to strip individuals of Norwegian citizenship if they were suspected of terrorism or of joining foreign militant groups.
She apologized in parliament last week for causing a political storm. Opposition parties, however, said her gesture was not sincere enough, and that she should resign.
Norway's opposition Christian Democrats said on Monday it would join five center-left parties in backing a no-confidence motion, securing a majority in favor of ousting Listhaug.
The vote in parliament had been scheduled to take place later on Tuesday.
Conservative Prime Minister Erna Solberg faced the choice of letting Listhaug go, weakening the cabinet and risking a defection by her Progress Party allies, or to get the whole government to resign.
Listhaug "told me late last night that she wanted to resign," Solberg told a news conference, adding that Listhaug could potentially make a comeback in the cabinet at some point.
"The important thing for me is that the Progress Party remains in government, Listhaug said.
She lashed out at Labour and the Christian Democrats, arguing they were not sufficiently tolerant of free speech when they sought her dismissal.
"The national debate has been turned into something of a kindergarten dispute," Listhaug said.
"I don't want to change. I see this as an attempt to gag the debate. I will continue to pursue the fight from parliament," she added.
Norway does not allow snap elections, and while Solberg might have been able to form a new government, the task could also have fallen to opposition Labour leader Jonas Gahr Stoere.
"My goal here is to keep Stoere out of the prime minister's office," Listhaug said.
(Additional reporting by Ole Petter Skonnord, writing by Terje Solsvik and Alister Doyle; Editing by Raissa Kasolowsky)