The former attorney-general has used his final speech to warn federal parliament about China's capabilities and the importance of protecting the rule of law.
The outgoing Liberal MP Christian Porter leaves parliament after a scandal-plagued 2021 in which he was accused of a historical rape he strenuously denies.
He told the House of Representatives on Tuesday that China's changes over the last decade had created a "massive risk" for Australia.
"Under this government, that is a risk we've been doing our best to understand, to prepare for and mitigate against - sometimes visibly and loudly, sometimes quietly and securely," he said.
"I leave this place having been part of a small but now very substantial group who've come to see the reality of this strategic risk, the immediacy, its peril and the menace that it offers."
Mr Porter said the "mob" which came after him when the rape allegations against him surfaced was not something he would wish on anyone.
"The rule of law is the antidote to the rule of the mob," he said.
"I experienced a mob of people so utterly convinced in their own judgement that they didn't need anything else other than their own judgement.
"I saw the real truth about how critical the protection of the rule of law is - how fragile it is - and how every man and woman in this country should fight for those protections as if their lives depend on it."
Mr Porter thanked political journalist Peter van Onselen and Defence Minister Peter Dutton for their support during that time.
"Some people will join a mob and others will slink away thinking that they can harness it in their own interest ... very few people ever try and stand in the way of a mob," he said.
Mr Porter compared his 14 years in parliament representing the WA seat of Pearce to being suspended in space.
"Time in politics does not run like time outside politics, it is genuinely like being in a black hole," he said.
He said his work in the social services and attorney-general portfolios was some of his proudest.
"I hear reliably that there is life outside this place, so it's time to go live that life."