The U.S. Senate passed a $410-billion omnibus spending bill Tuesday night to fund the government — a bill that has been criticized by some for including thousands of congressional pet projects.

The Senate approved the legislation by voice vote after senators narrowly approved shutting down debate, a move that requires 60 votes and passed by a 62-35 margin.

On Wednesday, U.S. President Barack Obama is expected to sign the bill, which will fund the government through September.

The bill has been assailed by some Republicans for including congressional pet projects, also known as "earmarks."

The legislation was written mostly over the course of last year and contains 7,991 earmarks totaling $5.5 billion, according to the GOP staff of the House appropriations committee. Republicans got about 40 per cent of the earmarks.

The White House has also been put on the defensive over the bill following Obama's pledge during last fall's election campaign to crack down on wasteful spending.

Officials have said the legislation was "last year's business" and that things will change going forward.

The bill also contains numerous policy changes, including: relaxed rules for Cuban-Americans travelling to the island to visit relatives, and an allowance for rules put in place by the administration of former president George W. Bush — and opposed by environmentalists — to be quickly overturned.

With files from the Associated Press