* Listhaug complains of "witch hunt"
* She was poised to lose confidence vote
* Dispute prompted by comments on militants (Adds political scientist, reactions, replacement)
By Joachim Dagenborg and Gwladys Fouche
OSLO, March 20 (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 lenient on militant suspects.
Listhaug had been poised to lose a confidence vote in parliament later on Tuesday over her Facebook postings - a prospect that could have seen her right-wing party leave the coalition in protest or the whole government resigning.
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.
She said she had faced a witch hunt and accused the opposition of not tolerating free speech. "The national debate has been turned into something of a kindergarten dispute," she said.
Listhaug, of the Progress Party, accused the opposition Labour Party this month of putting "terrorists' rights" before national security, a particularly sensitive topic for Labour, which had to deal with the mass shooting by far-right militant Anders Behring Breivik in 2011.
Listhaug made her comments after Labour and the Christian Democrats helped defeat a bill that would have given 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 apologised 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 back five centre-left parties in backing a no-confidence motion, securing a majority in favour of ousting Listhaug.
Finance Minister Siv Jensen, her party leader, told reporters on Tuesday the Progress Party would have left the government had the motion of no confidence passed.
Listhaug "told me late last night that she wanted to resign," Conservative Prime Minister Erna Solberg told a news conference, adding that Listhaug could potentially make a comeback in the cabinet at some point.
"The situation was much more critical for the government yesterday. Now it is solved," said Johannes Bergh, a researcher at the Institute of Social Research in Oslo.
Bergh said Listhaug stood out from other politicians in Norway, where the tradition is to search for consensus across parties.
"She is polarising," he said. "She has a rhetoric that is not common in Norway but more normal in other countries ... She is more populist, and a more right-wing populist, than other Norwegian politicians."
Per Sandberg, the fisheries minister, was appointed interim justice minister, the government said. (Additional reporting by Ole Petter Skonnord, writing by Terje Solsvik and Alister Doyle Editing by Raissa Kasolowsky)
Our Standards: The Thomson Reuters Trust Principles.