Shorten stopped short of calling for Jamie Clements' resignation, but his intention was clear when he told the media he had "zero tolerance for workplace harassment" and had ordered an urgent report on the matter from NSW Labor president Mark Lennon. Kristina Keneally was one of the loudest voices calling for Jamie Clements' resignation on Thursday. Credit:Robert Shakespeare Within hours Foley was in touch with his deputy, Linda Burney​, and both were calling for Clements to go. It only took Labor party bosses, led by Lennon, a little over two hours to convince Clements to resign, effective 5pm on Thursday. His likely replacement, Kaila Murnain​, 29, will be the NSW party's sixth general secretary in eight years, highlighting the instability that has rocked the branch in recent times.

But while the powerbroker was sacrificed for the good of the federal party heading into an election this year - Clements was preparing to run the NSW campaign - the episode also has potential ramifications for Foley as state leader. A new poll on Thursday showed Luke Foley had slipped further behind Mike Baird in the preferred premier stakes. Credit:Peter Rae Clements was the one who used his powerful position as general-secretary to convince Foley to take the job one year ago and twisted enough Right faction arms in caucus to make it happen for the senior left-winger. With Clements gone, Foley's position is far less secure. Even before his ousting was made official, there were rumblings of dissent about how Foley had handled the episode. Jamie Clements used his influence as general-secretary to help install Luke Foley as leader. Credit:Peter Rae

"Bob Carr or Kevin Rudd would never have let this bleed for seven months," said one senior party member as the drama unfolded on Thursday. On the same day a new poll showed Foley had slipped further behind Premier Mike Baird in the preferred premier stakes, with a rating of just 15 per cent. With Jamie Clements gone, Luke Foley's position is far less secure. It has also exposed the dysfunction within the Right faction-dominated NSW head office – the largest and most important of Labor's branches – just months out from Opposition Leader Bill Shorten fighting a federal poll. As Paul Keating famously said: "Where goes NSW, so goes federal Labor."

Bill Shorten's intention was clear when he told the media he had "zero tolerance for workplace harassment". Credit:Alex Ellinghausen "The internal politics of the Right have made a difficult situation far more complicated," another senior party member said. "That's the key thing we'll look for out of this. We'll look for improvements about how Sussex Street works." Indeed, in the style that has come to almost define NSW Labor in recent years, Clements was felled largely thanks to a media campaign fuelled by enemies within his own party. The Daily Telegraph broke the news in August last year that police had initiated an apprehended violence order against Clements after being approached by 27-year-old Stefanie​ Jones, a staff member in the office of Campbelltown MP Greg Warren.

Jones had alleged Clements tried to kiss her during an altercation in a Parliament House office the previous month. As she claimed to the newspaper in an explosive interview, published on Thursday morning, that sealed Clements' fate, he had become enraged when she told him she was about to disclose an affair they had had to her fiancé, state Labor organiser David Latham. In a version of events that has been described by Clements as "completely false", Jones said Clements locked the door, demanded assurances that she wouldn't tell, and aggressively demanded that she kiss him. In the Sussex Street pecking order, Latham is a senior Right faction figure, ranking only behind Clements and the two assistant secretaries, John Graham from the Left and Murnain from the Right. As soon as news broke about the AVO, the party was alive with speculation that it was related to an internal power play.

One theory had it that Murnain was unhappy in her role, largely because of a difficult working relationship with Clements. The prospect of Murnain's highly coveted position falling vacant meant Latham was logically the next in line. But, so the theory goes, Clements had other ideas – a decision that lit the fuse which led to his demise. The intense internal politics of the NSW Right faction took care of the rest. Supporters of Jones and Latham aggressively ran their case through the media in a campaign that culminated in this week's front page splash quoting Jones describing elements of the party as "filth", and decrying a lack of support for women.

Sensing blood in the water, a simultaneous campaign had been launched by more of Clements' enemies in the Right. Details of an internal report that was ordered into governance of the NSW division were leaked, revealing accusations from one party member that Clements had misused Labor's privileged access to the electoral roll. The claim – again, strongly denied by Clements – was that Clements had used the roll to provide the address of a north coast man, Craig Wilson, as a favour for former union boss Derrick Belan​. Belan is alleged to have passed the details on to a friend who allegedly threatened Wilson. Another internal report into the status of women in the party by barrister Jane Needham, SC, was also strategically leaked.

As its most senior powerbroker was fighting allegations of sexual harassment, selected sections of Needham's report were reported as saying women were "faced with a hostile environment" when using the party's affirmative action rules. It reportedly said women suffered a highly "sexualised environment" within the NSW branch. Clements was also facing being caught in the crossfire of two high profile union issues. The disgraced Health Services Union was seeking to be readmitted to the Labor fold after having been disaffiliated following the fraud committed by former bosses Craig Thomson and Michael Williamson. In December, Unions NSW voted to disaffiliate Belan's National Union of Workers after the revelations at the trade union royal commission.

Now Clements is gone, attention within the party is switching from the organisational leadership to the parliamentary leadership. Even as Clements' demise played out on Thursday, discussion was rife within the party about how it would affect Foley's future. When Foley agreed to take on the job a year ago, two things happened. Leading right-wingers like shadow treasurer Michael Daley had their noses put out of joint. And the right-wing unions that backed Clements into the job via their control of the party's annual conference and administrative committee, expressed their deep concern about having a left-wing leader.

Clements used his influence as general-secretary to bring them and right-wing MPs around to install Foley as leader. Now he has gone, scrutiny falls on his likely successor, Murnain. The question on many lips is: will she back Foley in the way Clements had? Murnain is known to not be close to Foley and goes back a long way with Daley, who remains Foley's most likely challenger. Murnain was Daley's electorate officer for two years until 2007. She also worked as a policy officer for former premier Kristina Keneally – one of the loudest voices calling for Clements' resignation on Thursday. Further complicating matters is Foley's strident statements about not being held to ransom by the union movement in his policy formulation.

The comments particularly riled the powerful Electrical Trades Union. Perhaps tellingly, perhaps not, on Thursday one of Daley's key backers, Labor MLC Adam Searle, posted on his Facebook page a call for Clements to go. Linking to a story about Clements refusing to resign, Searle posted: "Violence against women should never be tolerated." In Foley's favour, the numbers required to remove him as leader are not there, in most people's estimation. The caucus rules state that it takes a vote of 60 per cent of MPs to take out a leader. But left-wing MPs remain solidly behind Foley and he retains the support of the majority of Right MPs in most people's view, one third of whom simply will not back Daley.

No-one is quite sure what the answer to the Murnain question is, but it is understood that there is – unsurprisingly, given its tumultuous recent history – a desire for stability within the NSW branch. All of this means Foley is likely safe for now. The question is whether the situation holds all the way to the 2019 election.