The United States federal government shutdown ended on Friday morning after the House of Representatives passed the spending bill, AFP reported. The House voted 240 to 186 in support of a bipartisan package to extend US government funding till March 23.

The federal government receives funding from annual budget appropriations by the US Congress. The legislation that provides these funds must be passed by a certain deadline. But if it is not passed, most federal departments and agencies shut down. Federal government workers, who would not receive their salaries due to the pending finance legislation, can stop showing up for work.

The bill had been cleared by the US Senate in the early hours of Friday, too late to prevent a shutdown. The Senate then sent the bill to the US House of Representatives.

US President Donald Trump hailed the passage of the legislation, saying it was a “big victory” for the military, which would be “stronger than ever before”.

Trump also made a poll pitch – the Senate and House elections are due in November. “Sadly, we needed some Democratic votes for passage [of the bill],” he said. “Must elect more Republicans in 2018!”

The federal government had shut down for the second time in three weeks after Senator Rand Paul of Kentucky held up a vote on the far-reaching budget deal, The Washington Post reported.

Paul, a Republican, delayed the passage of the bill as he was unhappy with the huge increases in spending that the deal would entail. He demanded that the chamber vote on an amendment that would keep in place caps on spending.

“The reason I am here tonight is to put people on the spot,” The New York Times quoted Paul as saying. “I want people to feel uncomfortable. I want them to have to answer people at home who said, ‘How come you were against President Obama’s deficits and then how come you are for Republican deficits?’”

The government had shut down on January 19 after the Democrats held up the spending bill, demanding that the administration of President Donald Trump extend a programme known as the Deferred Action for Childhood Arrivals, or DACA. The Democrats had agreed to back the bill on the condition that the Republican Party would address extending the duration of the programme, which shields young immigrants from deportation.