SYDNEY, Australia — One candidate ranted about the danger of the “homosexual lifestyle.” Another called for the genital mutilation of non-Muslim women who support Islam. A third made light of rape, and yet another boasted that he had “done more Asian than I know what to do with.”

Nearly every day in the brief run-up to the Australian election on May 18, voters have confronted a new revelation of toxic speech by politicians, propagated largely on social media. The offensive remarks have forced at least six candidates for Parliament to quit, while many more linger like zombies — most of them from the conservative governing coalition and other parties on the right.

This Great Flushing Out, experts say, reveals a paradox. Homophobia, Islamophobia and other markers of intolerance are more embedded in the country’s psyche and politics than many Australians want to admit. But at the same time, analysts see signs of hope as the major political parties cast out candidates for their comments, drawing clearer lines than ever on what constitutes acceptable conduct.