Two votes cost Rockdale MP Frank Sartor his ambition of becoming Premier.
Kristina Keneally defeated Mr Sartor 25-22 in the right-wing caucus ballot which preceded the full party meeting where MPs voted 47-21 to dump Nathan Rees in favour of her.
Mr Sartor said the replacement of Mr Rees was "something that had to happen'' and he believed Ms Keneally would do a good job.
Opposition Leader Barry O'Farrell said the turmoil and the fact that Ms Keneally had once again been chosen by power-brokers Eddie Obeid and Joe Tripodi again demonstrated Labor did not deserve to govern.
After being sworn in today, Ms Keneally's first major job will be to chair a jobs summit in western Sydney.
In the evening, she will meet earlier commitments to present leadership awards at Our Lady of the Rosary church at Kensington in her electorate and attend a Christmas party for the Windgap Foundation at South Sydney Juniors Club.
Ms Keneally has invited Mr Sartor back into the ministry and also wants Mr Rees to serve on the front bench.
She denied Mr Rees' claim that she would be a puppet of right-wing powerbrokers Eddie Obeid and Joe Tripodi.
Ms Keneally told Parliament: "Let me be absolutely clear on this: I'm nobody's puppet, I am nobody's protege, I am nobody's girl.''
Later she said that she had been "my own person'' from an early age and at the age of eight had challenged her local bishop on a radio talkback program about girls not being allowed to be altar servers.
What do you think about the outcome of the leadership battle?