A last-ditch effort on Capitol Hill Saturday staved off a government shutdown with less than three hours to spare, as House Speaker Kevin McCarthy (R-Calif.), in an abrupt strategic reversal, offered a plan that won the support of nearly all House Democrats and most Republicans to keep the government open through mid-November.