The White House and House Republicans have an agreement in principle on a deal to raise the debt ceiling for two years and cap spending, House Speaker Kevin McCarthy confirmed Saturday, moving the nation one step back from the brink of a historic default. The agreement in principle was reached by President Joe Biden and McCarthy during a phone call Saturday, a source familiar with their call said. Now both leaders face the tall task of selling the deal to their allies in both chambers of Congress, where Republicans control the House and Democrats control the Senate. The deal must get passed before June 5 – the crucial date when Treasury Secretary Janet Yellen says the US will no longer be able to pay its bills. “After weeks of negotiations, we have come to an agreement in principle. We still have a lot of work to do but I believe this is an agreement in principle that is worthy of the American people,” McCarthy said during a brief remarks to reporters. “The agreement protects my and congressional Democrats’ key priorities and legislative accomplishments,” Biden said in a statement. “The agreement represents a compromise, which means not everyone gets what they want. That’s the responsibility of governing.” If the deal ends up passing through Congress and being signed into law by Biden before that so-called X date, the White House and House Republicans will have avoided an unprecedented economic crisis. A default by the US government, which has never happened, could spark a global recession and the loss of millions of jobs – a scenario that loomed over a last-minute rush of holiday weekend negotiations. The two-year deal would also push the next fight over raising the debt ceiling until after the 2024 elections. House GOP leaders briefed all members on the state of negotiations later in the evening, according to multiple sources familiar with the situation, and the text of the deal will be reviewed overnight by both sides to ensure it lines up with the tentative agreement. The White House plans to brief Democrats on Sunday, according to a Democratic aide. Despite the deal in principle, new issues could easily crop up at each step along the way, and each step has the potential to be time-consuming, running out the clock ahead of the debt limit deadline early next month. Stiff opposition is expected from both the left and right. That means it’s going to require an intense whipping operation – and support from both sides of the aisle – to get the bill over the finish line. McCarthy heard some immediate complaints from the most conservative members of his party. Rep. Bob Good, a member of the House Freedom Caucus, expressed his objections to the deal during the House GOP call on Saturday night. He said he was disappointed in the deal and that they are raising the debt limit by more than the US would save under the plan, according to three sources on call. McCarthy detailed what he argued were the positive parts of the deal and asked him to come in and talk about it. Rep. Scott Perry of Pennsylvania, the leader of the House Freedom Caucus, raised concerns on the call as well, but other conservatives sounded more upbeat – like Rep. Jim Jordan of Ohio, one of the sources said. Key parts of the deal The agreement in principle will lift the debt limit for two years and roughly cap non-defense spending to current fiscal year levels for 2024 and increase it by 1% in fiscal year 2025, according to a source familiar with the negotiations. As part of the deal, the White House has also appeared to have made concessions to House Republican negotiators on work requirements for people receiving food stamps. The agreement reached on Saturday phases in food stamp time limits on people up to age 54 that will then sunset in 2030, while also exempting veterans and people who are homeless from these limits, according to this source. The current work requirement for the program, formally called the Supplemental Nutrition Assistance Program or SNAP, only applies to certain adults between the ages 18-49. The agreement does not make any changes to Medicaid and prevented certain changes to the Temporary Assistance for Needy Families (TANF) program called for by Republicans, according to this person. A source with knowledge of the negotiations told CNN earlier Saturday that a provision to impose new work requirements for certain social safety net programs had remained a final sticking point. Republicans had been pushing the issue hard, saying beneficiaries of programs, such as food stamps, who do not have dependents should be forced to follow new rules. Democrats, however, had cast that idea as an attack on poor people. McCarthy told reporters Saturday evening that he expects the House to vote Wednesday on the agreement reached with the White House. McCarthy said negotiators will continue working Saturday night to write the legislative text and that he expects to speak with Biden again on Sunday afternoon before the final legislative text is posted Sunday. House Republicans circulated a fact sheet of the details of the debt limit agreement to House and Senate Republicans Saturday night after announcing the deal, according to two sources with direct knowledge of the document. The fact sheet says the agreement will cut spending year over year and set a 1% top line number for the next six years at one percent growth. It also includes SNAP and TANF work requirements. The bill would include an administrative pay-as-you-go provision to require that Biden finds offsets for rules and regulations that increase federal spending. It would slash the fiscal year 2023 funding request for new IRS agents, and claw back tens of billions in unspent funds meant to combat the Covid-19 pandemic. Default looms The pressure on negotiators is intense as the US steadily inches closer to the possibility of a default and the threat of economic catastrophe. In a major development Friday that will give lawmakers more time to reach and pass a deal, Treasury Secretary Janet Yellen said that Congress must address the debt ceiling by June 5 or the government will not have enough funds to pay all of the nation’s obligations in full and on time. Previously, Yellen had estimated that the earliest possible date a default could occur was June 1. McHenry said the Yellen’s new date “clarifies that our timeline is very tight.” “House Republicans asked for clarification. Chip Roy and Matt Gaetz and Byron Donalds and Dan Bishop, among others, asked for clarification on Secretary Yellen’s math. She updated her math. Obviously, it was a good request. And I think it clarifies our window for us to actually achieve the deal,” he said Saturday. Debt limit predictions, however, aren’t clear-cut. Rather than a set-in-stone deadline, it is more of a best-guess estimate, which makes it harder to know exactly how much time Congress has to act to avert potential financial catastrophe. This story has been updated with additional information.