Image copyright Getty Images Image caption In 2013, the government did shut down in a row over healthcare

Congress has struck a budget deal to avert a government shutdown, but it allocates no cash for President Donald Trump's proposed US-Mexico border wall.

The $1tr (£770bn) agreement to keep the US government running until 30 September was reached on Sunday night.

While there was no money for a wall, Republicans managed to secure $1.5bn in spending on border security.

Lawmakers are expected to vote on the package in the coming days. Full details are yet to be made public.

The deal comes after Congress approved a temporary spending bill that averted a government shutdown at the weekend.

That gave Congress one more week to work out federal spending for the last five months of the fiscal year.

The failure to act would have closed national parks and monuments and left hundreds of thousands of government employees without pay.

The last shutdown, in 2013, lasted for 17 days.

Media playback is unsupported on your device Media caption The divided newlyweds split over Trump's performance

What about Trump's wall?

White House demands for the spending bill to include a down payment on a barrier along the southern border have come to naught.

The $1.5bn for border security in the new budget comes with key caveats.

The Trump administration can only spend the money on repairs to existing fencing, infrastructure and technology, according to US media.

Nor has the administration succeeded in its plan to eliminate funding for so-called US sanctuary cities, which shelter undocumented immigrants.

However, Mr Trump insists he will still get money for his key campaign promise in a new spending bill this autumn.

The Republican president told a rally in Pennsylvania on Saturday night: "We'll build the wall, people, don't even worry about it."

What are the wins for Democrats?

Democrats say they torpedoed from the spending bill 160 policy measures, known as riders, that they labelled "poison pills".

According to reports, none of Mr Trump's calls for $18bn in non-defence cuts are included.

Democrats also fended off potential cuts to Planned Parenthood, a family-planning group abhorred by social conservatives because it provides abortions.

The 1,600-page spending bill reportedly gives retired coal miners $1.3bn in health benefits, a priority of two Democratic senators.

Democrats have also secured $295m to help Puerto Rico continue making payments to the Medicaid health insurance programme for the poor, and $100m to combat opioid addiction.

And New York Democrats secured $61m of funding to reimburse law enforcement agencies for the cost of protecting Mr Trump when he travels to his residences in Florida and New York.

Furthermore, the deal increases funding for the National Institutes of Health, despite the Trump administration's calls to reduce the medical research agency's budget.

Last week, Democrats also wrung from the White House a concession that the bill would not target subsidies paid to insurers to keep Obamacare costs down for low-income patients.

Democratic Senate leader Chuck Schumer said in a statement. "The bill ensures taxpayer dollars aren't used to fund an ineffective border wall, excludes poison-pill riders, and increases investments in programs that the middle-class relies on."

What are the wins for Trump?

President Trump has won $12.5bn in extra funding for defence spending.

However, that falls short of the $30bn sought by his budget blueprint.

The spending package would save him and congressional Republicans the embarrassment of presiding over a government shutdown.

"We couldn't be more pleased," US Vice-President Mike Pence said in an interview on CBS This Morning.

But Jim Jordan, chairman of the House of Representatives Freedom Caucus, said he and fellow hardline conservatives were "disappointed".

Republicans control the Congress, Senate and White House, but Democratic votes are still needed to pass the bill.