WASHINGTON - Paul Ryan was elected the 54th speaker of the House on Thursday as his colleagues looked to the Wisconsin Republican to help unite his fractious party and end the constant crises that have come to dominate the chamber in recent years.

Ryan received 236 of the 432 votes cast. Minority Leader Nancy Pelosi, D-Calif., received 184. Rep. Daniel Webster, R-Fla., got 9 votes. A handful of other people got a total of three votes.

The 45-year old Ryan, who was the Republican nominee for vice president in 2012, is the youngest speaker to lead the House in 140 years. He has served as chairman of two of the most powerful committees - Budget and Ways and Means - during his nearly 17 years in Congress.

Ryan initially balked at running for speaker but was persuaded by his GOP colleagues to become a candidate after Majority Leader Kevin McCarthy, R-Calif., withdrew his candidacy because he did not believe he had the 218 votes needed to win. Ryan decided to run only after winning the support of the three major factions of House Republicans - moderates, traditional conservatives and the rebellious Freedom Caucus.

"He did not seek this office; the office sought him," said House Republican Conference Chairwoman Cathy McMorris Rodgers, who formally nominated Ryan on the House floor Thursday.

Outgoing House Speaker John Boehner, R-Ohio, wished Ryan well in an emotional farewell speech before the vote.

"Paul is being called," Boehner said. "I know he'll serve with grace and energy. And I want wish him and his family all the best."

Boehner, who has served in the House for 25 years and been speaker for the past five, said he is leaving Congress on Friday with "no regrets, no burdens."

"I'm the same regular guy who came here to try to do a good job," Boehner said, drawing laughter as he grabbed a box of Kleenex before he started to speak. Boehner is known for his tearful speeches.

Before he stepped down as speaker, Boehner won House approval Wednesday of a two-year budget package that should help prevent Ryan from having to deal with any immediate fiscal crises such as a government shutdown or a default on the nation's debt. The Senate is expected to approve the budget deal soon.

Ryan's mother, Betty, his wife, Janna, and his three children were in the House chamber as Ryan was sworn in. Also in attendance was Mitt Romney, the former Massachusetts governor and 2012 GOP presidential nominee who chose Ryan as his running mate.