Congressional negotiators agreed late Monday night to extend funding for many U.S. government programs to mid-December in a bipartisan move to avert any shutdown of agency operations that would otherwise occur by this weekend.

The funding measure crafted by House of Representatives and Senate appropriators would keep many agencies funded until Dec. 16 and, at the same time, fund other government programs through the rest of the current fiscal year that ends next Sept. 30.

The agreement would fund the departments of Agriculture, Commerce, Justice, Transportation, and Housing and Urban Development through the end of the current fiscal year.

Agencies whose operations would be extended through Sept. 30 would be funded at a level $7 billion lower than the previous year and about $98 billion below what President Barack Obama requested, according to the House Appropriations Committee.

Both the full House of Representatives and Senate still must formally vote to approve the spending deal.

The legislation introduced today represents a bipartisan compromise that will prevent a potential government shutdown, support important programs and services that the American people rely on, and make hard but necessary cuts to help rein in the nation's deficit, House Appropriations Committee Chairman Hal Rogers, R-Ky., said in a statement.

The legislation attempts to block some proposed Agriculture Department rules governing the livestock and poultry industries. It also would block additional government regulations of gun dealers and reduce funding for Amtrak, the government-backed passenger train service.

The legislation stands in the way of the Obama administration's plan to establish a new office within the U.S. National Oceanic and Atmospheric Administration to monitor climate change developments. Obama had sought more than $300 million to establish the new Climate Service operation.

(Additional reporting by Richard Cowan; editing by Will Dunham)