DANBURY — The Danbury Housing Authority was awarded Friday a more than $982,000 grant from the federal government.

The city’s authority is among more than 30 in the state to earn funding from the U.S. Department of Housing and Urban Development, which gave out over $36.4 million in Connecticut and $2.7 billion nationwide. About 2,900 public housing authorities in the country received grants.

Ansonia, Bridgeport, Greenwich, New Haven, Norwalk, Stamford, Seymour, Stratford, Milford and West Haven are among the other housing authorities to earn the money.

Funding is expected to help the housing authorities to build, repair, renovate and/or modernize their housing.

“This funding will assist Connecticut public housing agencies as they work to provide the best housing possible for their residents,” David Tille, HUD New England regional administrator, said in a statement.

A 2011 study found the nation’s then-1.1 million public housing units had an estimated $25.6 billion in capital needs, according to HUD. Since that study, the organization developed a strategy to address these needs.