GREAT BARRINGTON -The rusted railings are scary enough, and the whole thing looks a bit dicey.

But what people might not know as they cross the Cottage Street bridge over the Housatonic River is that the supports that hold up the bridge deck aren't doing so well, either.

The Berkshire Eagle reports the town of Great Barrington has received a $5 million grant from the state Department of Transportation. The money will replace the 84-year-old span, reconstructed once in the 1960s, which is suffering from what a bridge inspector in 2014 deemed a structural deficiency, most seriously to its superstructure.

"We were a bit surprised," said the town's Department of Public Works Director Sean Van Deusen, upon learning of the grant. "It was part of our long term capital plan, so to have the state step in and do this is quite serendipitous."

The 134-foot-span is still safe to cross for now. MassDOT would shut it down if it weren't, according to the agency. All the state's 5,171 bridges are on a two-year inspection plan, with more frequent inspections for those rated structurally deficient.

Its weight limit for trucks has been reduced for the time being. But for a critical residential link from Main Street to Route 7 to remain, the bridge has to be rebuilt.

Town Manager Jennifer Tabakin announced the Transportation Improvement Program grant on Monday, and said MassDOT would start work to the town-owned bridge in 2022. Anticipating the overhaul, the Department of Public Works Director Sean Van Deusen has already completed initial design work.

This is the story all over the Berkshires, as infrastructure ages, and towns over the years have skrimped on maintenance to keep taxes down in a fragile rural economy.

As of November, Berkshire County had nearly 50 structurally deficient bridges, according to MassDOT data. But currently 17 are in a queue for state-funded replacement or repair, with work slated to start between 2018 to 2022.

While this grant is a coup for Great Barrington, the town still has two other deficient bridges to deal with on either side of town, that rattler on Division Street, and the other on Brookside Road. Both span the Housatonic.

There is also the Brown Bridge, which is state-owned, and which is being investigated by a MassDOT consultant for future repairs, but no plan is in the works yet.

Tabakin is happy about the grant, since the town didn't qualify for the state's small bridge program funding.

"Our bridges aren't small enough," she said.