Two senior Victorian Labor MPs have resigned from cabinet and announced they will not contest the upcoming state election – just days after new Premier Ben Carroll was sworn in.

Lily D’Ambrosio and Harriet Shing – who both previously backed Jacinta Allan ahead of a leadership spill earlier this week – made the bombshell announcements on Thursday afternoon.

Mr Carroll, in his own statement, thanked both MPs for their years of service.

“They have brought compassion, determination and a strong sense of purpose to their roles, delivering outcomes that have improved the lives of Victorians and strengthened the communities they represent,” he said.

The pair were both prominent backers of Jacinta Allan, supporting her ahead of the planned leadership spill that ended her premiership.

In early June, Ms Shing said she had not discussed a potential leadership change with anyone and would support Ms Allan leading the party into the next election.

On Tuesday, Mr Carroll was sworn in after the previous premier stepped down after less than three years in the position.

Ms D’Ambrosio had held the seat of Mill Park since 2002, saying her time in parliament had been a “tremendous privilege” after reflecting on the policy reforms she delivered.

In a statement, the Minister for Climate Action said it was time to “pass these opportunities and obligations on to the next person” and she would “look forward to standing by (Mr Carroll) and the entire Labor team to earn every vote and see a Carroll Labor Government returned in November”.

“In the midst of a cost-of-living crisis and global uncertainty, families today still depend on Labor governments to fight for them,” the close ally of Ms Allan said.

“I know that Premier Ben Carroll values all of these things and more because he has lived challenges himself.

“He deserves the full support, solidarity, and respect of the Cabinet, the Caucus, and our entire labour movement as he takes the Government forward and into the all-important contest against the Liberal Party and One Nation in November.”

In a similar sentiment to Jacinta Allan’s resignation speech, Ms D’Ambrosio said she hoped her “life in public service shows all girls what is possible for them no matter their faith, what they look like or the way they speak”.

Ms D’Ambrosio and Ms Shing wished Premier Carroll every “success”.

“I have no doubt that the fight we bring to the coming months will continue to be grounded in the principles and priorities that drive all of us,” the Minister for Health said.

The two resignations came after Mr Carroll already had the task of replacing Ms Allan’s cabinet position, leaving three vacancies.

More to come