ROME — Italian Premier Paolo Gentiloni formally resigned Saturday following the election of new parliament speakers, but was immediately asked by the president to stay on while the country’s political factions jostle to try to form a new government.

Italy’s inconclusive March 4 election saw a surge in populist and right-wing sentiment but produced no majority in parliament.

The transition of power got underway in earnest Saturday after lawmakers voted to give the anti-establishment 5-Star Movement the leadership of one chamber of parliament and Silvio Berlusconi’s right-wing Forza Italia leadership of the other.

Forza Italia Sen. Maria Elisabetta Alberti Casellati, a longtime Berlusconi ally, became the first woman to be elected Senate president. In an emotional acceptance speech, she said she wanted to share the victory with “all the women whose histories, actions, examples, commitment and courage have built Italy today.”

The 5-Stars’ Roberto Fico was elected president of the lower Chamber of Deputies.

Their elections followed reports overnight of a perceived split between Berlusconi and the League of Matteo Salvini, the main parties in the center-right bloc. But by Saturday, Berlusconi and Salvini were talking only about the solidity of their bloc and their wish to govern Italy.

Nevertheless, there was still no solid indication that either of the two biggest vote-getters from the March 4 election — the center-right and the 5-Stars — was any closer to forming a government.

Negotiations on forming a coalition government are expected to last weeks. At some point, President Sergio Mattarella will decide which bloc, if any, is able to command the 51 percent majority in each chamber necessary to pass a confidence vote.

If no party or group can cobble together a working majority, Mattarella could sponsor a person with a limited mandate and term to govern. That could eventually lead to an early election if all options fail.