The Speaker sets the House agenda and oversees legislative business. The post is second in line to the presidency after the US vice-president.
Speaking after his confirmation, Mr McCarthy wrote on Twitter: "I hope one thing is clear after this week: I will never give up. And I will never give up for you, the American people."