SYDNEY (Reuters) - The leader of the opposition in Australia’s most populous state was replaced on Saturday after he resigned over a #MeToo row sparked by alleged inappropriate behavior.

Former New South Wales (NSW) state Labor party leader Luke Foley resigned on Thursday after being accused of sexually harassing an ABC journalist, four months before a state election he had been in a position to win.

Foley denies the allegations and said he has hired lawyers to sue for defamation over the claims.

NSW Labor deputy leader Michael Daley defeated opposition water spokesman Chris Minns to win the vacant leadership in a caucus meeting on Saturday afternoon.

He promised to build his government on four pillars: investing in schools and hospitals, lowering the cost of living and lowering energy bills.

“We will make Sydney more livable, and stop the unfairness

and overdevelopment in the planning system,” he told reporters in Sydney.

Daley also said his party would re-task $2.2 billion earmarked by the state’s conservative Liberal government to upgrade sporting stadiums to instead train young people for employment.

Daley will lead NSW Labor to the March 23 election in Australia’s largest state, but despite Foley’s resignation the scandal is likely to dent Labor’s chance of winning power.

A ReachTel poll in September had Labor and the ruling conservative coalition running neck-and-neck in the state.

The NSW economy accounts for one-third of Australia’s gross domestic product and at $400 billion is larger than the economies of Thailand, Malaysia and the Philippines.