McCarthy was elected after receiving a majority after 15 rounds of voting.