The co-deputy of the Greens, Scott Ludlam, has resigned from Parliament after discovering he was ineligible to stand at last year's federal election.
Senator Ludlam, who was first elected to the Senate a decade ago, made the bombshell announcement in Perth on Friday afternoon.
The Western Australian, who was born in New Zealand but left when he was a child, recently discovered he remains a dual citizen with that country, meaning he was actually disqualified from running for office at the 2007, 2013 and 2016 elections.
"I apologise unreservedly for this mistake," the outgoing senator said.
"This was my error, something I should have checked when I first nominated for preselection in 2006.
"I am personally devastated to learn that an avoidable oversight a decade ago compels me to leave my colleagues, supporters and my wonderful team."
He is the third senator forced out of Parliament since the July 2 election. Former Family First senator Bob Day's election was ruled invalid over a conflict of interest issue, while former One Nation senator Rod Culleton was forced out after being declared bankrupt.
It's unclear what his resignation means for the make-up of the Senate, however the Greens expect to retain the seat following a hearing of the Court of Disputed Returns and a special recount.
Greens leader Richard Di Natale said he was "devastated" by Senator Ludlam's discovery.
"Scott's decision today to deal with this issue directly and immediately shows his absolute integrity and character," he said in a statement.
"In the coming days and weeks we will finalise what this means in terms of Scott's vacated seat. In the meantime, let's reflect on the tremendous contribution that Scott has made to this nation and to the Greens.
"It has been an honour to sit in the Senate with Scott, and to have him as a deputy leader. Scott's tenacity, creativity, strength and intelligence should be an inspiration to us all."
Last November, Senator Ludlam announced he was taking leave from Parliament to deal with long-term mental health issues.
In a Facebook post at the time, he said he was taking leave to deal with depression and anxiety. He returned to work in January this year.
He has been co-deputy leader of the party with Larissa Waters since 2015, when Richard Di Natale became leader.
Senator Ludlam, 47, has focussed on communications, technology and foreign affairs during his time in the Senate.
In 2014, he made headlines with direct address to then prime minister Tony Abbott in the Senate, explaining his home state of Western Australia. The video was shared almost 300,000 times in three days.