The week of July Fourth is a good moment to salute an unlikely champion of saving energy and switching to alternative fuels — the U.S. Navy. Once a supreme fuel-guzzler whose energy needs sometimes dictated foreign policy, the Navy has become a model for how the country can curb its appetite for fossil fuels.

The Navy’s energy diet began seven years ago with an edict from newly appointed Secretary Ray Mabus, who issued five goals for radically changing how the Navy bought and consumed fuel. A former Mississippi governor who had served two years as U.S. ambassador to Riyadh in the mid-1990s, Mabus worried about how vulnerable the U.S. military was to foreign energy sources.

The Navy, like most military services, likes its traditions. So the idea of a “Great Green Fleet” met considerable resistance from admirals and their allies in Congress. The Navy brass resisted, in particular, Mabus’s commitment to switch the Navy’s consumption so that by 2020, at least 50 percent of its fuel would come from alternative sources. At that time, many Navy commanders thought that 30 percent was a realistic target.

The Navy has already exceeded that 50 percent target in its contracts for fuel ashore, Mabus told me in a recent interview. And it expects to meet the overall goal well before 2020. Under the rules Mabus set for transition, the alternative fuels must be ready to “drop in” for any requirement, including jet fuel for an F/A-18 Hornet; the fuels must be competitively priced; and any biofuels can’t take land away from food production.

Mabus, who served aboard a cruiser in the early 1970s, argues that this energy shift is as much about national security as environmental goals. Saving fuel reduces combat vulnerability: He notes that in Afghanistan, the Marine Corps suffered one Marine killed or wounded for every 50 convoys of fuel. Less fuel consumption means fewer casualties.

The Navy’s main push has involved alternative fuels for ships, planes and shore facilities. The cost curve has come down sharply: Mabus says that four years ago when the Navy began buying jet fuel that used a heavy mix of biofuel, it cost $25 a gallon. Today, it costs less than $2 a gallon.

The Navy is also making some new “hybrids,” such as the amphibious assault ships USS Makin Island and USS America. These ships use electric propulsion for lower speeds and save the gas turbines for higher speeds. Mabus says the “Prius of the sea,” as he jokingly calls the Makin Island, was able to remain at sea 44 days longer than expected without refueling. Over a ship’s lifetime, the savings could add up to $250 million, the Navy says.

Mabus also pushed the Navy and Marines to begin using alternative technologies for electricity. The Navy is refitting ships to use long-lasting LED lights; so far, 7 percent of the fleet has made this transition, saving the equivalent of 1 million gallons of marine diesel fuel annually. Marines deployed in combat are now using solar panels, where possible, to produce power that would otherwise come from generators and batteries. For a Marine company, this could spare troops from lugging 700 pounds of batteries into combat.

Another nice thing about using green technology in combat, says Mabus, is that it’s quiet. He notes a comment by a SEAL Team officer after a recent deployment: “When you turn off the generator, you can hear the bad guys.” In remote, rural areas of Afghanistan, “a generator is likely putting a target on your back,” says Mabus.

The Navy has always been at the cutting edge with energy: Sailing vessels that depended on the wind gave way to steamships, which were replaced by diesel-powered vessels, which made way for nuclear carriers and submarines. Mabus says the Defense Department is still the largest single user of fossil fuels on earth, with the Navy accounting for about one-third of that total.

Climate change is a very practical problem for a seagoing Navy. Melting polar ice changes the strategic map of the world; rising sea levels are expected to displace up to 150 million living in coastal areas by 2050, adding to global instability; the Navy’s prize Atlantic port of Norfolk may be at risk, as sea levels rise through this century.

Occasionally, environmental and defense policy converge. Mabus’s energy initiative, which drew jeers at first, now looks like a demonstration of how to make the country stronger and greener at the same time.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.