WASHINGTON, D.C. — Automakers gained $25 billion in taxpayer-subsidized loans and oil companies won elimination of a long-standing ban on drilling off the Atlantic and Pacific coasts as the Senate passed a sprawling spending bill Saturday.

The resolution, passed the House on Wednesday, and was approved by the Senate on Saturday with a vote of 78 to 12. The spending proposal includes $5.1 billion for the Low Income Home Energy Assistance Program.

The vote sent the $634 billion measure to President Bush, who was expected to sign it even though it spends more money and contains more pet projects than he would have liked.

The measure is needed to keep the government operating beyond the current budget year, which ends Tuesday. As a result, the legislation is one of the few bills this election year that simply must pass. Bush’s signature would mean Congress could avoid a lame-duck session after the Nov. 4 election.

Sen. Olympia J. Snowe’s office said Saturday in a press release that she voted in the majority in passage of the measure that includes funding for defense, homeland security, disaster assistance, veterans affairs and other spending priorities

The solvency of the government and the future of our country depend on thoughtful and effective Congressional action and I am pleased that the U.S. Senate quickly passed this critical spending initiative,” Snowe said. “Spanning a wide array of budget priorities, the continuing resolution will ensure funding for our men and women in uniform, the medical needs of veterans, food stamps for the poor, and low-income heating assistance.”

Most notably, the resolution included funding for LIHEAP at its fully authorized level of $5.1 billion, plus an additional $250 million in emergency funds for weatherization. Snowe is a longtime proponent of increased LIHEAP funding and recently implored Congress to support The Warm in Winter and Cool in Summer Act and fully fund LIHEAP or face a disastrous winter with high energy costs and freezing temperatures.

Maine will also benefit from the inclusion of $40.6 million for three defense projects added by Snowe. Portsmouth Naval Shipyard will receive $20.7 million for the construction of a drydock and $9.9 million for the first phase of the Consolidated Global Submarine Component Facility. The spending bill also includes $20 million for a National Guard building in Bangor.

Sens. Susan Collins’ and Snowe’s offices said the spending measure contained the following:

Defense and military construction appropriation highlights

– $20.6 million for the construction of a waterfront support facility at Portsmouth Naval Shipyard.

– $9.9 million for phase one of the consolidated global submarine component facility at Portsmouth Naval Shipyard.

– $20 million for a National Guard training facility in Bangor.

– An increase of $100 million for the Littoral Combat Ship program and full funding of the president’s proposal of $344 million for the Joint High Speed Vessel program, key programs for Bath Iron Works.

– Full funding of the president’s proposal of $117 million for the M2 .50 caliber machine gun and MK-19 grenade launcher program, and an increase of $11.6 the Lightweight Caliber .50 Machine Gun and the Advanced Light-weight Grenade Launcher, all of which are manufactured at Saco Defense.

– Approximately $5.0 billion for the F-35 Joint Strike Fighter and F-22 Raptor aircraft programs, including an additional $35 million for the continued development of the F135 engine. Pratt and Whitney’s North Berwick remains a key supplier to these aircraft programs.

– $33.0 million for various research and development programs that would benefit firms in Maine, including Maine Marine Manufacturing of Portland, Howe and Howe of North Berwick, and Cross Rate Technologies of Standish, the University of Maine at Orono, and the Maine Institute for Human Genetics and Health in Brewer.

– An increase of $300,000 for the Naval Sea Cadets.

– An increase of $236 million for peer-reviewed breast cancer, prostate cancer, and tuberous slerosis complex research programs.

Other funding

– $6.4 million for the University of Maine. The authorized funding will support continued research and development of lightweight modular ballistic tent insert panels designed by the University of Maine’s Army Center of Excellence in Orono. The panels provide crucial protection to service members in temporary dining and housing facilities in mobile forward operating bases in Iraq and Afghanistan. The funding will also support continue research and development of high temperature sensors for health monitoring of aerospace components as well as cellulose nanocomposite panels for enhanced blast and ballistic protection.

– $554.8 million for C-17 Globemaster III aircraft, the engines of which are built by Pratt & Whitney plants, including the Pratt & Whitney North Berwick facility.

– $5 million for the Maine Army National Guard to field the Rapid Data Management System, developed by Global Relief Technologies in Kennebunk and Orono, Maine and in Portsmouth, New Hampshire in support of critical medevac operations in Iraq. This system provides near real-time data management and analysis to and from field operators via hand-held devices.

– $2 million for continued development of the autonomous SKYBUS “Lighter-Than-Air” Unmanned Aerial Vehicle technology, which has a variety of surveillance and communications applications for defense and homeland security purposes, by the Telford Group, Inc. in Bangor.

– $2 million to optimize the Mark V.1 “MAKO” for improved signature and weight performance. The Mark V.1 was developed by Maine Marine Manufacturing in Portland, the University of Maine in Orono, and Hodgdon Yachts in East Boothbay as part of the Mark V replacement patrol boat program to meet the U.S. Special Operations Command’s requirement for a high-speed Medium-Range Endurance Craft.

– $1.6 million to develop software which will secure content delivery and provide host authentication both of which are of critical importance to protect the Department of Defense’s technological edge. This software will be developed by ANGEL Secure Networks, Inc. in Orono, Maine.

– $1.6 million to enable technology to be rapidly configured and deployed on Navy Special Warfare craft. This funding will support a broad range of applications allowing the Commanders to tailor the system for Special Warfare Operators and their associated special equipment. This technology is being developed by Technology Systems, Inc., Brunswick.

– $1.6 million to develop and demonstrate the production capabilities of the DiscoTexTM discontinuous fabric technology for aerospace composite materials and structures. This technology, which was developed by Pepin Associates, Inc. in Greenville, has a variety of applications for military and civilian aircraft platforms.

– $1.6 million to provide the Department of Defense with a tool which will provide heading and compass information from a nonmagnetic source, as a backup system for the Global Positioning System. This technology is being developed by CrossRate Technologies, LLC in Standish, Maine.

– $1.6 million for continued research and development of high powered density propulsion engines that are being developed by Applied Thermal Sciences, Inc. in Sanford.

– $1.2 million to weaponize the Ripsaw Unmanned Ground Vehicle platform designed by Howe & Howe Technologies, Inc. in North Berwick.

– $1.2 million to continue development of a chemical and biological infrared detection system designed by Orono Spectral Solutions in Orono.

– $1 million for the development of a mobile valve and flex hose maintenance program will identify all valves and flex hoses onboard Navy ships in order to reduce life cycle costs.

– $800,000 to complete development of a prototype “Smar Low Income Home Energy Assistance Program t Valve,” which Portland Valve, LLC in South Portland has designed to replace bleed air regulating, control and relief valves on naval ships.

Veterans’ appropriations in the spending measure

– $47.6 billion — $4.5 billion above 2008 and $2.8 billion over the president’s request — for veterans’ medical care, claims processors and facility improvements. The funding agreement is fully supported by the American Legion, the Department of Veterans Affairs, and Disabled American Veterans.

– Rural Health Initiative: $250 million to improve access to medical care for veterans in rural areas.

– Patient Travel Reimbursements: $133 million above the president’s request to increase the travel reimbursement rate from 28.5 cents per mile to 41.5 cents per mile, while freezing the deductible.

– Assistance for Homeless Vets: $130 million for the homeless grants and per diem program, rejecting the president’s $8 million cut and the same as 2008, in addition to $30 million to hire additional personnel for the HUD-Veterans Affairs Supportive Housing Program.

The Associated Press contributed to this report.