THE US House of Representatives has voted to re-open the federal government and pass a $400 billion (£287bn) budget deal.

It overcomes opposition from both liberal Democrats and Tea Party conservatives to endorse enormous spending increases despite looming trillion-dollar deficits.

The 240-186 vote came in the pre-dawn hours, putting to bed a five-and-a-half hour federal freeze – the second such shutdown in three weeks.

The breakdown came largely in the Senate, the upper chamber of congress, when Republican senator Rand Paul of Kentucky went rogue and stalled a vote in protest over his party’s willingness to approve spending increases.

Democrats also experienced divisions, largely on account of liberals upset the measure was not tied to any plans to assist the “Dreamer” immigrants, brought into the country illegally as children.

Most Democrats opposed the measure, following the lead of minority leader Nancy Pelosi, who tried and failed to use the moment to secure a promise for a separate vote on immigration. Up to the final minutes, it was not clear the bill would pass and many Democrats held their votes, allowing the tally to creep slowly and giving no indication which way it might fall.

House speaker Paul Ryan urged congress to avoid a “second needless shutdown in a matter of weeks – entirely needless”.

There was far less drama in the Senate, where the measure sailed through by 71-28. US president Donald Trump has promised to sign the bill into law.

The White House was forced to order the government shutdown shortly after midnight, but leaders moved quickly before federal employees were due back at work, hoping to minimise the disruption. A shutdown essentially cuts the federal workforce in half, with those dubbed non-essential not allowed to work, while military and essential workers remain on the job.

The House vote ensured most employees would report for work as usual. Under federal law, passage of the measure is enough to call off the shutdown; Trump is expected to sign the measure as soon as he receives it. The White House kept its distance from the quarrelling on Capitol Hill – Trump did not tweet on the matter, and advisers did not try to assign blame.

Senate Republicans, however, were clearly irked by the debacle. In his attempt to sway Rand Paul to relent, senator John Cornyn of Texas declared his fellow Republican was “wasting everyone’s time” and prompting a shutdown for “no good reason”. But Paul, the resident contrarian, repelled suggestions to stand aside.

“I didn’t come up here to be part of somebody’s club,” Paul said. “I didn’t come up here to be liked.”

The bill includes huge spending increases sought by Republicans for the Pentagon along with a big boost demanded by Democrats for domestic agencies. Both sides pressed for $89bn (£63bn) for disaster relief, extendin healthcare provisions, and extending a slew of smaller tax breaks.

It also would increase the government’s debt cap, preventing a first-ever default on US obligations.

Meanwhile, Thai police have arrested a Russian national accused of running an online cybercrime marketplace where everything from stolen credit card information to hardware for compromising cash machines could be purchased.

Sergey Medvedev was arrested in Bangkokt on February 2 at the request of US authorities.

The US justice department has announced indictments against 36 people accused of being active in the Infraud Organisation - founded in 2010 and operating under the slogan “In Fraud We Trust”.