WASHINGTON — Representative Paul D. Ryan of Wisconsin was elected the 54th speaker of the House on Thursday, taking the gavel that he never sought to wield from John A. Boehner, who gave it up under fire.

Mr. Ryan received a comfortable margin of victory that included several of the hard-line conservatives who had worked to oust Mr. Boehner. In his address to Congress after the vote, he implored members who had been fighting so bitterly to find a way to work together. “Let’s be frank: The House is broken,” Mr. Ryan said. “We are not settling scores,” he added. “We are wiping the slate clean.”

Mr. Ryan, 45, the youngest speaker since 1869, comes in warning those members that he expects them to support him.

His reflection of modern politics comes in the form of the cot in his office that he sleeps on, in lieu of the old school Capitol Hill apartment that Mr. Boehner preferred.