BANGOR, Maine — Bangor has been awarded a $1.4 million federal grant to purchase four new buses to add to its aging fleet that city officials say has been in dire need of an upgrade.

U.S. Sens. Susan Collins and Angus King announced Friday in news releases that the Community Connector had been awarded the Federal Transit Administration grant.

The city’s bus service, which also runs routes through Brewer, Hampden, Orono, Veazie and Old Town, has been struggling to keep enough of its aging buses running to maintain its services.

This grant will add four new buses to the fleet. However, it will take about two years for all the vehicles to be built and shipped to Bangor, according to Bangor City Council Chairman Sean Faircloth.

“It’s really a game changer in respect to the condition of the fleet,” Faircloth said Friday.

Bangor’s bus fleet is 22 vehicles, but at any given time, several of those buses are out of commission for repairs or maintenance to get them running or keep them from breaking down, Laurie Linscott, the bus system’s superintendent, has said. Earlier this summer, four buses were down and waiting for new engines.

During this year’s budget process, the rough state of the bus service prompted the city to pump an additional $528,000 into the system’s fiscal year 2017 budget to refurbish high-mileage buses, improve cleaning and expand the bus system’s office space. Community Connector also ordered a pair of new buses, but those also will take more than a year to arrive.

“The Community Connector Public Transit Services strives to provide effective, safe and reliable transportation for our citizens, many of whom rely on bus services as their primary means of transportation,” Collins said in a news release. “This important investment will significantly enhance the quality of our bus service, expand mobility, and increase access to employment, education and health care facilities in our rural and urban areas.”

Community Connector has seen its ridership drop in recent years.

In fiscal year 2013, the buses offered 936,500 rides, which increased to a peak of 941,500 the next year. In fiscal year 2015, ridership dropped by more than 40,000, a roughly 4 percent drop. By the end of the current fiscal year, it’s expected to drop again, though only by about 2 percent.

Linscott has said that the new funding from the city and feds would help her improve the bus service, and ultimately lead to longer hours that will allow more people to take the bus.

Follow Nick McCrea on Twitter at @nmccrea213.