Italian Prime Minister Mario Draghi resigned Thursday after failing in his efforts to unite the fractious pieces of his unity government.

President Sergio Mattarella’s office said in a statement the president had accepted Draghi’s resignation but asked him to stay on in a caretaker role.

The development could mean Italy heads to a parliamentary election in the coming months instead of the scheduled vote set to take place next year.

Draghi became prime minister in 2021 as Italy dealt with the effects of the coronavirus pandemic and a sagging economy.

Mattarella rejected his earlier offer of resignation last week, urging Draghi to appeal to lawmakers to keep the ruling coalition together.

But several key parties boycotted a confidence vote, prompting Draghi to submit his resignation again.

Some information for this report came from The Associated Press and Reuters.