Gladys Berejiklian has resigned as NSW premier after the state's anti-corruption watchdog announced it would investigate her over her relationship with ex-MP Daryl Maguire.
"I have no option but to resign from the office of premier," she said on Friday.
"Resigning at this time is against every instinct in my body.
"I love my job, and I love serving the community but I have been given no option following the statement that's been issued today."
She will also leave parliament as soon as a by-election for her seat can be held.
Ms Berejiklian did not take questions from journalists after saying she had always exercised her duties with "the highest levels of integrity".
Watch: Gladys Berejiklian resigns as NSW Premier. Post continues below.
She will remain premier until her successor is appointed. She ascended to the NSW top job in early 2017.
The Independent Commission Against Corruption said in a statement on Friday that it was investigating whether Ms Berejiklian "exercised public functions" in a position of conflict between her public duties and private relationship with Mr Maguire, revealed in late 2020.
A public inquiry on the matter will be held from October 18, overseen by ICAC Assistant Commissioner Ruth McColl SC.
It is expected to last about 10 days.
ICAC said Ms Berejiklian would be investigated over grant funding to the Australian Clay Target Association in 2016/17 and grant funding to the Riverina Conservatorium of Music in Wagga Wagga in 2018.