NSW Premier Gladys Berejiklian has survived a no confidence vote brought on by Opposition Leader Jodi McKay, who accused her of turning a blind eye to corruption.
The no-confidence motion was defeated 47-38 in the lower house on Wednesday while the same motion was also defeated in the upper house, after a tied vote forced chair John Ajaka MLC to weigh in and cast the deciding negative vote.
"Decisions should not be taken except by majority, meaning that the chair should not be the reason a motion passes," Mr Ajaka said, explaining his vote.
The narrow escape came amid a rowdy day in the bear pit after Ms Berejikilian spent a third day battling to keep her job as her former boyfriend Daryl Maguire faced a grilling at the Independent Commission Against Corruption.
Watch: Gladys Berejiklian admits to a "close personal relationship" with former MP Daryl Maguire. Post continues below.
Ms McKay told parliament that while Ms Berejiklian was entitled to have a private life, her "close personal relationship" with the disgraced former Wagga Wagga MP was a "damning indictment on her ability to run a government".
"This is a premier who failed to act ... and turned a blind eye to wrongdoing," she told the NSW lower house on Wednesday.