Greens senator Scott Ludlam is leaving federal parliament after finding out he was improperly elected more than a decade ago.
The party's co-deputy leader recently discovered that he holds dual citizenship with New Zealand.
Under section 44 of the constitution, that makes him ineligible to hold office.
Senator Ludlam labelled it a "ridiculous oversight".
"I apologise unreservedly for this mistake," he said on Friday.
"This was my error, something I should have checked when I first nominated for preselection in 2006."
Instead of going through protracted legal proceedings, he is resigning as a senator for Western Australia and co-deputy leader of the Australian Greens.
Senator Ludlam was born in Palmerston North in New Zealand and left the country with his family when he was three.
He settled in Australia not long before his ninth birthday, before being naturalised when he was in his mid-teens.
"(I) assumed that was the end of my New Zealand citizenship," he said.
"It is entirely my responsibility - it wasn't the way I was hoping to go out."
Greens leader Richard Di Natale said he was devastated at the news, but Senator Ludlam's decision to deal with the issue directly and immediately showed his integrity and character.
"Scott has been an outstanding member of the parliament and of the Greens," he said in a statement.
"He has been a strong representative for the people of WA and the nation on a range of issues."
"He will continue to be a champion of the Greens movement and a dear friend."
University student Jordon Steele-John has been touted the frontrunner to take the vacant seat.
Mr Steele-John, who has cerebral palsy, had to give up his British citizenship to run for parliament back in 2013.
The 21-year-old said there was a lot of processes to get through before he even thinks about accepting a role in parliament.
"Like everyone else in the party I'm going to be spending the next week in sad shock and/or swearing loudly into a pillow," he posted on Facebook.
"We can worry about who, and how the hell we try to substitute someone else in for Scott later. The next few weeks will be hard for us all. But we will get through it, together."
Senator Ludlam is the fourth senator to leave the upper house this parliamentary term.
Bob Day and Rod Culleton were both ruled ineligible for constitutional reasons, while Liberal senator Chris Back resigned.