Republican secures votes after backroom deal quells party rebellion