WASHINGTON, May 21 (Reuters) - The Biden administration will sell nearly 1 million barrels of gasoline in the U.S. managed stockpile in northeastern states as required by law, the Department of Energy said on Tuesday, effectively closing the reserve.

The department created the Northeast Gasoline Supply Reserve in 2014 after Superstorm Sandy left motorists scrambling for fuel. But storing refined fuel is costlier than storing crude oil, so closing the reserve was included in U.S funding legislation signed by President Joe Biden in March.

Bids are due on May 28 and the Treasury Department's general funds gets proceeds from the sale, the department said.

The volumes will be allocated in quantities of 100,000 barrels with each barrel containing 42 gallons, the department said. That will ensure the gasoline can flow into local retailers ahead of the Fourth of July holiday and that it will be sold at competitive prices, it said.

“By strategically releasing this reserve in between Memorial Day and July 4th, we are ensuring sufficient supply flows to the ... northeast at a time hardworking Americans need it the most,” Energy Secretary Jennifer Granholm said in a release.

The companies buying the gasoline, likely retailers and fuel terminals, will have the fuel transferred or delivered no later than June 30, it said. Some 900,000 barrels will be sold from the reserve's Port Reading, New Jersey, site, and nearly 99,000 barrels from the South Portland, Maine, site.

Once the reserve is closed, the energy secretary cannot establish any new regional petroleum product reserve unless funding is requested in advance of an annual budget submitted by the president and approved by Congress. (Reporting by Timothy Gardner; Editing by Lisa Shumaker and Marguerita Choy)