The Massachusetts Bay Transportation Authority is borrowing to help fund transit upgrades. The MBTA plans to sell about $939 million in municipal bonds, according to preliminary bond documents. It is the latest US transit operator to shore up funds as COVID-19 aid from the federal government evaporates and ridership levels struggle to return to pre-pandemic levels. The agency’s deficit is projected to balloon to nearly $500 million by fiscal 2028, according to pro forma forecasts shared in February. It also needs at least an estimated $2.5 billion annually to address a backlog of repairs. Proceeds raised in the sale of the bonds will fund, in part, the modernization of Massachusetts’ subway fleets, the installation of new fare payment machines, and an expansion of its commuter rail fleet with new bi-level cars, according to the documents. — BLOOMBERG NEWS