There was relief for M train riders Monday morning in Brooklyn and Queens, as full service was restored after a part of the line was shut down for ten months of repairs.

The MTA shut down three miles of the M line, from Middle Village to the Myrtle Avenue stop, last July. Shuttle buses replaced the trains.

During that time, new tracks and a new third rail were installed, along with the replacement of local signal equipment and cables.

After rebuilding a bridge by the Fresh Pond Road station in Ridgewood, service resumed from Middle Village to Myrtle-Wycoff.

5 a.m. Monday, the section from Myrtle-Wycoff to Myrtle Avenue reopened after the MTA completed the rebuilding of a 100-year-old crumbling 310-foot stretch of elevated track in Brooklyn called the Myrtle Viaduct.

MTA officials said the work, a $163 million project, is finishing on time and within budget.

Many residents and businesses had to be relocated due to the repairs, but the agency said they have since been able to return.

Transit officials are hopeful residents on Ditmars St. will notice something different on the tracks that run directly behind their buildings.

"We haven't replaced it like for like," New York City Transit President Andy Byford said. "It's been replaced with noise-suppressing technology, so that there's less noise from the trains and there's less vibration."

When the L train temporarily stops running between Brooklyn and Manhattan next year, many riders are expected to use the M as an alternate.