President Trump at the White House on Tuesday. (Jabin Botsford/The Washington Post)

Congressional Republicans are working aggressively to craft an agreement intended to keep the government open past April 28, but their bid to avert a shutdown hinges on courting Democrats wary of President Trump and skirting the wrath of hard-line conservatives and Trump himself.

The murky path forward on government funding sparked unease Wednesday within the business community and at the Capitol, where Republicans speculated that Trump’s request for money to build a wall along the border with Mexico and $30 billion in new defense spending may need to be delayed to avoid a shutdown.

Several Republicans said Wednesday that there is little appetite within their ranks to engage in a protracted showdown over Trump’s call to begin funding a border wall in the near-term spending bill, which Democrats and some conservative Republicans oppose. And they said Trump’s wishes would gravely threaten any deal.

“It would blow up the great opportunity,” said Sen. Roy Blunt (R-Mo.). “I’m convinced.”

Instead, leaders are hoping to put together a spending bill that can win approval from enough Democrats to render negotiations with most intransigent conservatives unnecessary. Blunt and others said it is certain they will need Democratic support: Republicans hold a 52-48 advantage in the Senate, meaning they will need at least eight Democrats to reach the 60 votes necessary to pass the spending bill in that chamber.

(Peter Stevenson/The Washington Post)

“We can’t pass anything without them,” said Sen. John Cornyn (R-Tex.), a top deputy to Senate Majority Leader Mitch McConnell (R-Ky.).

In the House, Democratic support would be critical in neutralizing any opposition from the roughly three dozen members of the conservative Freedom Caucus, many of whom have routinely opposed previous spending bills.

But for the moment, neither House nor Senate Democratic leaders have committed to supporting a spending plan. Bipartisan committee negotiations are underway, and crucial elements of an agreement remain unfinished. Democrats, too, bring their own challenges to the negotiating table. They are under pressure from their liberal base to oppose virtually everything that Trump and Republicans do — especially, in the case of the budget, funding for a border wall. But they and most of their supporters also favor keeping government open, and they are vulnerable to being accused of hypocrisy if they are seen as playing a part in causing a shutdown after years criticizing Republicans for doing the same.

Meanwhile, several congressional aides said that Republicans are agitated by the lack of clarity from White House officials over a strategy to avert the awkward theater of a Republican-driven shutdown on the watch of a Republican president.

It also remains unclear whether opposition from the Freedom Caucus — or from Trump himself — could derail Republicans’ plans. The hard-line conservatives in the House were an enormous factor last week in the defeat of the American Health Care Act, and the fallout for Trump and House Speaker Paul D. Ryan (R-Wis.) has ruptured the chamber's dynamics and made many GOP members unsure of whether major legislation can find sufficient Republican support.

Equally unclear is the role these conservatives intend to play in the next rounds of policy and budget battles. “We’re not going to have a government shutdown,” Ryan said in an interview with CBS scheduled to air Thursday, according to a tweet from Norah O’Donnell.

Trump allies in the House said Wednesday that the president should not allow Republican leaders to shape the spending agreement and urged him to make a firm demand that the wall be funded. “Everything to do with a shutdown carries some risk, but we should take the risk because Trump has a mandate to build the wall,” Rep. Steve King (R-Iowa) said.

Trump’s response to any emerging deal on spending will be another significant factor, congressional aides said. If he does not support the measure, it could be in jeopardy.

White House aides on Wednesday played down their earlier call for Congress to include the border wall and spending cuts in the near-term spending bill as nothing more than an early-stage negotiation. Aides acknowledged that Congress has control over the spending process; a request for $33 billion in funds for defense and border protection, plus $18 billion in cuts to help offset those funds, was merely “planting flags,” according to one White House official with knowledge of the negotiations.

None of that, however, precludes the possibility of Trump declining to give his blessing to a spending plan if it lacks his requests.

The uncertainty has left top Democrats prepared for the seemingly promising spending talks to fall apart.

“It’s in their hands now,” Sen. Richard J. Durbin (D-Ill.), the minority whip, said in an interview.

Yet there is also room for agreement.

Democrats have said privately that they would be open to approving some spending on border security and defense, as long as it does not directly fund construction of the wall, said several Senate Democratic aides who were granted anonymity to speak about ongoing negotiations. But those funds would have to be narrowly tailored, because Senate Democrats have vowed to block any attempt to start construction on the wall.

“Senate Democrats are prepared to fight this all the way,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said at an event highlighting their opposition Tuesday.

Democrats “will do everything possible to make sure that U.S. taxpayer moneys do not go to build a wall,” said Sen. Robert Menendez (D-N.J.), adding later: “At the end of the day, he should keep his word and make someone else pay for it — not the United States taxpayer.”

Democrats also remain opposed to granting fresh funding for new hires at Immigration and Customs Enforcement, but they could support supplies for Border Patrol agents such as drones or sensors that aid enforcement, the aides said.

One option lawmakers have to keep the government open past April 28: pass a “clean,” short-term resolution that holds the budget to current spending levels, although leaders in both parties said they would prefer to pass an omnibus spending bill that would allow them to make changes.

Senate Appropriations Committee member Lamar Alexander (R-Tenn.) said committee members plan to wrap up work Wednesday on the early elements of a spending framework that would boost defense and border spending.

That additional spending could be paid for by using special war funds that are not subject to spending caps that the budget is otherwise required to adhere to. That would give leaders flexibility to add defense funds without worrying about breaking a bipartisan agreement reached in 2015 that requires Congress to give equal funding to defense and nondefense programs.

Cornyn added that the goal for now remains avoiding a shutdown — “absolutely” — and seeing if Republicans can avoid having to pass a “clean” continuing resolution that lacks new appropriations.

“I’m not there yet, but it could happen,” Cornyn said of the likelihood of a clean spending measure becoming at some point next month the only legislation that could pass both chambers.

Ed O’Keefe and Karen Tumulty contributed to this report.