More than $2.5 million in Hurricane Sandy relief aid has been awarded to New Jersey to buy dozens of generators to help keep gas stations up and running during emergency situations.

The federal funding will help New Jersey purchase 52 portable generators that will be delivered to retail fuel stations in the event of a mass power outage, according to federal lawmakers. Residents waited in long lines to get gas after Sandy, in part because many stations lacked backup power and remained shuttered in the days after the storm.

The state last October launched a grant program with federal money to help fuel stations prepare for future power outages by installing permanent connections for mobile generators, among other measures.

The generators will be stored at three locations around the state: Franklin Borough, Hamilton and Woodbine. U.S. Sens. Robert Menendez and Cory Booker recently announced the funding to the state, which is provided by the Federal Emergency Management Agency's Hazard Mitigation Grant Program.