TREASURE ISLAND — Tropical storms in 2012 swept hundreds of thousands of cubic yards of sand from this barrier island's beaches, but nearly a year later, the federal government has agreed to put it all back.

The U.S. Army Corps of Engineers has approved more than $8 million in federal emergency funding and general construction dollars for the beaches on Treasure Island. To qualify for the money and to cover the project's estimated $12 million price tag, Pinellas must come up with another $4 million. County officials said they expect the state will cover half of their portion.

"This is going to restore us back to full; it's just a godsend," said Treasure Island Mayor Bob Minning. Ever since last summer, when Tropical Storm Debby visited Tampa Bay and spent several days swirling overhead, the area's beaches have looked "pretty skinny," he said.

Long Key, another barrier island that was battered by Tropical Storm Debby, did not qualify for a share of the emergency funding.

Unlike Treasure Island, which endured some of the worst beach erosion in the county, Long Key's losses were "relatively small," Pinellas County coastal manager Andy Squires wrote in an email.

In deciding whether to grant emergency funds, the corps typically weighs the cost of a project against the amount of sand lost and the risk damaged dunes pose to people living nearby, Squires said. In Long Key's case, the threat was not great enough.

A study of the county's beaches by University of South Florida researchers immediately following Tropical Storm Debby found that Treasure Island lost 93,500 cubic yards of sand. On Sunset Beach, which was narrow to begin with, the storm carved up the dunes, pushing what remained of them back by 18 feet. Storms dumped the sand just offshore in growing sandbars or pushed it farther south.

On Long Key, which is significantly larger than Treasure Island, beaches lost a total of 113,400 cubic yards of sand. Much of it came from Pass-a-Grille beach.

Dredging and pumping sand onto Treasure Island's beaches could begin as early as this September, Squires said.

As for Long Key, the county will have to wait another year and hope the corps includes funding for it in its 2014 work plan.

"We hope we can get enough leverage politically and whatever it takes to get it into that work plan," Squires said.

Securing federal money to pay for beach restoration has become an increasingly difficult task, as individual members of Congress are no longer allowed to earmark money for projects in their districts. Spending cuts and the sequester, which could slow the pace of the corps' projects, have also drained some of county officials' optimism.

Anna M. Phillips can be reached at aphillips@tampabay.com or (727) 893-8779.