BANGOR, Maine — As work crews dig up Main Street to replace aging water lines, they are unearthing an often forgotten piece of Bangor’s transportation history — trolley tracks.

Until the years after World War II, Bangor was home to an extensive network of street trolley lines that stretched through the Queen City, connecting outlying towns, including Charleston, Brewer, Old Town and Hampden.

When the war came to a close, buses began to gain favor, according to Dana Lippitt, curator at Cole Land Transportation Museum. Personal automobile ownership also started to take a stronger hold. Trolleys didn’t mesh well with regular vehicle traffic, and the trolley system was shut down on the last day of 1945.

The first Bangor trolleys were launched in 1889 as electric service started spreading across the city. Over the years, service expanded off of Main Street, with spurs spreading to serve neighborhoods.

“Having the trolley as a means of transportation enabled the neighborhoods to grow” because people could begin to live on the outskirts and still have a reliable method of getting into town,” Lippitt said. Residents who couldn’t afford horses — or automobiles in later decades — could then afford to travel to and from the city on a regular basis.

Once the tracks were abandoned, at least some of them were just paved over, while others likely were torn out. It’s unclear how many tracks are still buried under Bangor streets.

A century and a quarter after the tracks began serving the region, construction crews are digging up more than 3,000 feet of Main Street to replace outdated water lines. To clear the way, they’ve had to tear up tracks in the way.

Follow Nick McCrea on Twitter @nmccrea213.