The federal base-closing commission rejected two of the Pentagon's most significant recommendations on the future of U.S. military installations yesterday, voting to keep open a sprawling submarine base in Connecticut and a historic shipyard in Maine.

Four other sizable military facilities, in Texas, California, Louisiana and Nevada, also were spared by the commission, which demonstrated a readiness to overrule the Defense Department during the first day of voting on the largest proposed closure and consolidation of domestic military bases in a decade.

But such deviations from the Pentagon's plan were largely the exception. For the most part, the nine-member commission went along with the department, backing the closure of 12 major Army bases and four major Navy installations and the shutting of hundreds of Navy Reserve, Army Reserve and National Guard facilities in dozens of states.

The commission also agreed with the Pentagon -- for now, at least -- to save Naval Air Station Oceana in Virginia Beach. But it threatened to reverse that decision and shift operations to Florida unless Virginia officials act quickly to reduce development encircling the massive jet base. That could mean buying up homes and relocating schools that lie in the flight path.

The commission plans to vote today on two proposals important to the Washington region: closing Walter Reed Army Medical Center and shifting 20,000 defense jobs in leased office space in Northern Virginia to bases farther from the Pentagon.

Moving swiftly through its deliberations yesterday without much debate, even on the most disputed cases, the commission also appeared poised to tackle its most challenging issue -- an Air Force proposal to remove aircraft from about two dozen Air National Guard facilities -- as early as this afternoon, a day ahead of schedule.

The commission must submit its final report to President Bush by Sept. 8. The president can either accept the list or send it back for revision, before forwarding it to Congress, which must either accept or reject the recommendations in full.

The decision to preserve Naval Submarine Base New London in Groton, Conn., the nation's oldest sub base, and the Portsmouth Naval Shipyard in Kittery, Maine, effectively preserved a major military presence in New England. It reflected concerns voiced repeatedly by commission members in the run-up to yesterday's voting that the proposed closures would hit New England too hard and risk leaving the region insufficiently protected.

National security considerations were cited by former president Jimmy Carter and retired admirals who lobbied the commission to reject the Pentagon's plan, which had called for the base's 18 submarines to be dispersed to sites in Virginia and Georgia. Local and regional officials highlighted the devastating economic impact that would result from the loss of more than 8,000 military and civilian jobs at the sub base and more than 4,000 jobs at the shipyard.

Presenting the motion to save the base, commissioner Lloyd W. "Fig" Newton, a retired Air Force general, warned that the Navy may not be able to reduce its fleet as fast as planned because of the possible emergence of new threats in Asia and elsewhere. "I find that it would be a big mistake to close it at this time," he said.

Anthony J. Principi, the commission chairman, said terminating the base -- which was established in 1868 as a coaling station and started taking submarines in 1915 -- would be irreversible. "If we close New London down, we will never get it back," he said.

Only James V. Hansen, a Republican former Utah congressman, objected to keeping the base open, saying doing so would mean excess capacity and empty piers in the future.

Commissioners also cited strategic considerations in justifying retention of Portsmouth, worrying that reducing the number of military shipyards from four to three would leave the nation with too little capacity to service the fleets in time of emergency. Principi also praised the facility, founded by President Thomas Jefferson in 1800, as "the gold standard" by which to measure shipyards and a model for labor-management relations.

The decisions were a huge relief in both communities.

"The Navy is part of the fabric of our community," Groton Mayor Harry Watson said of an area where the submarine base and related businesses generate $3.3 billion in annual economic activity and account for 31,500 jobs, according to state estimates. "The Navy is everywhere."

By contrast, there was disappointment and anger in New Jersey where the commission voted to close Fort Monmouth and shift the Army's communications electronics command to Aberdeen Proving Ground, a change that will bring more than 4,000 jobs to Maryland. Estimated to save about $1 billion, the transfer represents the Army's single largest economy move.

"We are going to fight this to the very end," declared Sen. Jon S. Corzine (D-N.J.), who said in a statement that he might vote against the entire base-closing package because of the decision.

Some of Fort Monmouth's jobs also will go to Fort Belvoir in Fairfax County, which could gain as many as 18,000 workers by the end of the realignment process. Fort Meade in Anne Arundel County could gain more than 5,000 jobs.

To keep Oceana open, the commission insisted on an array of zoning restrictions, land purchases and other changes that would ensure that naval aviators can continue to practice challenging maneuvers, including some that require jets to fly just 600 feet over surrounding neighborhoods.

If state and local leaders do not take those steps by next March and agree to spend at least $15 million a year buying some developed land in a crash zone around the base, the commission will direct the Navy to move the base and its 15,000 military and civilian workers to a revived Cecil Field near Jacksonville, Fla.

Commission member Samuel K. Skinner, a former U.S. transportation secretary, said Virginia needs to "clean up the mess" that it made by allowing so much development so close to Oceana. Still, he and other commissioners believe that Virginia should be given a chance to fix the problems. But it must act by next March, or Florida would get the chance to reopen Cecil Field to about 140 F/A-18 Hornets and Super Hornets and about 50 F-14 Tomcats.

"There is a strong feeling that we owe one last chance to the people of Virginia to get their act together," Skinner said.

Virginia Gov. Mark R. Warner (D) and Sen. John W. Warner (R-Va.) vowed yesterday to work with local and federal officials to meet the commission's demands and keep Oceana open. The governor said it is unclear how much money the state will have to spend on reducing residential encroachment around the base.

Spokesmen for the Army and Navy declined to comment on yesterday's commission decisions, saying their services will have nothing official to say before the voting is completed and the administration can assess the results.

The Pentagon has proposed closing or consolidating more than 800 facilities to save nearly $50 billion over 20 years and help refashion the armed forces to face 21st-century threats. Previous commissions (1988, 1991, 1993 and 1995) altered about 15 percent of what the Pentagon proposed. But one new consideration overshadowing this year's process is the likely effect any changes will have on the military's ability to carry on the war in Iraq and sustain defensive operations at home.

That appeared to be an important factor, for instance, in the commission's decision to reject a Pentagon recommendation to close Red River Army Depot in Texas, which repairs Humvees and Bradley Fighting Vehicles and refurbishes missiles.

"With the nation being at war, this is the wrong time to be closing depots," declared commissioner James T. Hill, a retired Army general and former head of the Southern Command.

In other reversals, the commission also decided to keep open Hawthorne Army Depot in Nevada, Naval Support Activity Corona in California and Naval Support Activity in New Orleans.

But wartime and homeland defense arguments were not always sufficient to save a base. Contentions by Hansen, for instance, that defense along the Gulf of Mexico required retention of naval facilities at Ingleside and Corpus Christi, Tex., were rejected by other commissioners who approved the shift of minesweepers to San Diego.

Staff writers Michael D. Shear and Michelle Garcia in Groton contributed to this report.

Commissioner James V. Hansen, second from left, discusses a point with Executive Director Charles Battaglia, second from right, as the future of Naval Air Station Oceana, Va., comes up. The base won a reprieve for the time being.

Sen. Kay Bailey Hutchison (R-Tex.) confers with the base-closing commission's chairman, Anthony J. Principi, during voting on installations.