President Joe Biden enters a critical two-week period for his ambitious agenda. He is racing to close contentious congressional negotiations before both domestic deadlines. This will also give him a chance to show off his accomplishments on a worldwide stage.

Biden and his Democratic colleagues are trying to reach across party lines by the end of the month to pass a bipartisan bill on infrastructure and a larger package for social services. Both are important issues that the president wants to resolve before Air Force One departs for Europe on October 28. This will be for two summits of world leaders, including the most ambitious meeting yet regarding climate change.

However, this goal is now at risk due to fractures within Democrats. This could jeopardize the future of promised new sweeping efforts to address climate change. The party is also growing anxious about a bellwether contest for Virginia’s governorship and the looming Senate fights regarding the federal debt limit, government funding, and other issues that could distract from the president’s agenda.

After a turbulent period marked by the end of the Afghanistan war and a diplomatic spat between a long-standing ally, Biden is now trying to stabilize his presidency. He also faced a surge in COVID-19 case numbers that rattled the nation’s economy and sent his poll numbers plummeting.

His team continued to use the same strategy that worked during the campaign and earlier in the year: to block out outside noise to focus on one mission. This time, it was to pass the two-part package which will give Democrats a platform to run for the midterm elections next year.

Biden stated Friday that the bills were about “competitiveness versus complacency,” about opportunity versus decline, and about leading or letting the world move by you.”

The White House’s appeals to patience, reminding people that difficult things take time, is not enough. There is an urgent sense that a deal must be done quickly.

The White House has specific target dates. These include an end-of month deadline for transportation funding and Biden’s upcoming overseas trip. There are other imperatives, however: proving Democrats can keep their promises to voters and protecting Biden’s diminishing political capital.

The administration has been sending signals to Capitol Hill with a renewed urgency in recent days. Officials from the White House spoke under condition of anonymity to avoid revealing private conversations. Biden has expressed frustration and will increase his personal outreach to lawmakers this week to try to reach a compromise and bring them to a vote, officials said.

Officials in the West Wing remain optimistic that an agreement will be reached, but there are fears that the lengthy and messy negotiations may have obscured the tangible benefits that Biden wants to offer voters.

Biden tried to address that issue when he visited Hartford, Connecticut last week to show initiatives to dramatically reduce the cost for early childhood care — possibly the only piece of legislation that will be included in the final package.

Even Democratic leaders are split on how to reduce the overall cost of the package to win more votes. Biden stated Friday that he favors keeping all the wish-list suggestions, but reducing the program length to reduce costs. Biden believes that a future Congress could vote to extend programs that are popular with the American people.

Nancy Pelosi, House Speaker, suggested that the opposite approach be taken. She would approve a smaller number of programs for a longer period of time.

Some Democrats are pushing for the passage of the bipartisan infrastructure agreement by Oct. 31, even if the larger social service package is not settled. This move is disliked by many progressives because it could reduce their leverage for the latter bill.

Particularly perilous is the fate of provisions on climate change.

Joe Manchin, West Virginia Senator, objects to a program that would accelerate the nation’s transition from fossil fuels. This is just as Biden tries to assert American leadership in the fight against climate change at the forthcoming global conference in Scotland.

Individual lawmakers such as Manchin and Arizona Senator Kyrsten Sinema have been empowered by the Democrats’ narrow margins in both Houses of Congress. This has irked fellow lawmakers and the White House. Officials said that while the White House has not abandoned its clean energy program, they are looking at alternative ways to combine a variety of policies to reduce emissions.

Biden could be hurt in Glasgow if the provisions are not followed. This summit is a crucial opportunity for the Obama administration to address climate change and to assert its leadership after four years of Trump’s retrenchment. Although the United States will bring a significant presence to the gathering, including former President Barack Obama, it could fall behind European countries that have taken concrete steps to reduce emissions.

Biden’s visit to Scotland in November will be in the wake of his participation at a summit in Rome for world leaders. However, the Chinese President Xi Jinping has decided to skip the gatherings which delayed the first meeting between leaders from the superpowers. This could reduce their importance. Biden and Macron will still meet in Italy as they seek to restore relations following a U.S.-Australian submarine deal that ended in a French contract. This led to the French temporarily withdrawing their ambassador from Washington.

The Nov. 2 Virginia gubernatorial elections are also on the horizon. These elections are seen as a referendum about Biden’s performance and the Democrats chances of retraining Congress control next year.

Terry McAuliffe is currently in a tight race with Glenn Youngkin, a Republican businessman from the state. This is a state where Biden won by 10 percentage points last year.

McAuliffe has been surprising public in his criticisms of the administration’s legislative strategies. He urged Democrats to pass the infrastructure bill prior to Election Day to give him something tangible to show voters. White House officials privately expect McAuliffe to emerge with a narrow win and believe they can ignore worries about a smaller-than-expected margin of victory.

However, a close outcome or Youngkin victory could shake Democrats, making them less likely take risks for Biden’s agenda. This would boost Republicans going into the midterms.