Plaid Cymru's Elin Jones has been chosen by Welsh Assembly members as their new presiding officer.
The Ceredigion AM beat party colleague Lord Elis-Thomas by 34 votes to 25, with Labour's Ann Jones elected to be her deputy.
The vote came after former presiding officer Dame Rosemary Butler stood down from the assembly at the election.
However, there was deadlock in the vote for first minister, with a tie between Carwyn Jones and Plaid's Leanne Wood.
Mr Jones was expected to be re-appointed, with Labour likely to form a minority government after the party lost a seat at the assembly election.
A Labour source said: "It was felt we came back with 29 seats, not 31.
"It would feel wrong to us, and a little presumptuous, to be both going for presiding officer and first minister."
Ms Jones said it was "an honour and a privilege" to be elected presiding officer, telling AMs as she took the chair: "You all look very different from up here!"
Ann Jones won the election for deputy presiding officer, beating Labour colleague John Griffiths by 30 votes to 29.
That position was formerly held by Conservative AM David Melding, who has ruled himself out for the presiding officer job.
The presiding officer acts as the figurehead of the National Assembly for Wales, chairing meetings in the Senedd chamber that are known as plenary.
The post is the second-highest paid job in the assembly, behind the first minister.
He or she receives a yearly salary of £105,000 - more than ministers, who earn £100,000, and more than opposition party leaders who can be paid up to £100,000.
The deputy presiding officer receives £85,000 a year.
The first minister is paid £140,000.
Dame Rosemary, former Labour AM for Newport West, said it had been an "absolute privilege to do the job".
"The point is you're there as a figurehead to make sure the assembly runs for the benefit of the members and people of Wales.
"There's a lot of passion in the chamber and you have to make sure people don't go overboard or don't insult somebody else.
"The main thing is to make sure that backbenchers do have the opportunity to speak - both the opposition parties and the government party - because that is their place to represent the people of Wales."
She said her successor should "enjoy it".