There had been disagreement over whether the role of speaker should go to the biggest party, the Social Democrats by a small margin, or to the biggest block, the center-right Alliance.
Last week, the Social Democrats' chief candidate, Björn von Sydow declined to run, because he did not want to be elected with the help of the far-right Sweden Democrats, now in Parliament for the first time.
Westerberg won the vote 194 votes to 153 after the Sweden Democrats decided to vote for the Moderate candidate, as did an unknown red-green MP. Westerberg would have won the vote even without the support of the Sweden Democrats, however, as Social Democrat MP Thomas Bodström was absent from the vote, and a Left Party MP missed her turn to cast her ballot, as she was taking a toilet break at the time.
The Sweden Democrats later failed to get their candidate for one of the deputy speaker posts elected, losing the vote 325 to 20, with the position going to a Green Party MP instead.