The Hugh L. Carey and Queens Midtown tunnels are getting $336 million of repairs from federal superstorm Sandy aid, officials announced Thursday.

The money for the MTA from the Federal Emergency Management Agency will go toward fixing architectural, mechanical and electrical parts and temporary flood walls at entrances, and elevating key equipment, according to federal officials.

The aid will also cover an emergency generator at the Governors Island ventilation building near the Carey (Brooklyn Battery) tunnel. The tunnels, which together see more than 100,000 cars a day, were flooded with about 80 million gallons of water during Sandy.

"The Brooklyn Battery Tunnel and the Queens Midtown Tunnel are critical thruways for New Yorkers who travel through Brooklyn and Queens," Sen. Kirsten Gillibrand said. "This FEMA funding is a great investment that will help provide the resources needed to make critical repairs to support the tunnels."