The last piece of the Boston area's long-awaited Green Line Extension opened early Dec. 12, with a crowd of eager passengers waiting to board trains at the new Medford station.

The launch of the newly minted Medford branch, which extends from Tufts University through stops in Somerville to Lechmere Station, marks the end of a $2.3-billion expansion of the Green Line in the works for literally decades.

The Union Square branch opened in the spring. The extension, or GLX, as it is called, totals 4.7 miles of new light rail tracks, six new stations, a new maintenance facility and reconstruction and relocation of Lechmere Station, among other things.

The opening of the new T line, by all accounts, had the feel of the transit version of a new film debut. Gov. Charlie Baker, surrounded by the state’s two U.S. senators, Elizabeth Warren and Ed Markey, Assistant Speaker of the House Katherine Clark, and a group of local mayors, cut the ribbon at the new Medford Green Line station.

And the jubilation is understandable given the twists and turns the project has faced over three decades, including being put on life support in 2015 after the project faced a $1 billion overrun.

 “It has been a long ride of fits and starts and near-death experiences, but we're all here to celebrate,” Warren told reporters.

The budget for the first three stations ballooned to nearly $900 million, up from the original estimate of $387 million.

The T terminated its agreement with the team of contractors and designers that had been working on the project, cut back on station bells and whistles and brought in a new set of contractors.

Made up of Fluor, Middlesex, Herzog, Balfour Beatty and STV, GLX Constructors was able to complete the job without any major budget overruns, and, despite some delays, deliver the project relatively on time.

Arup, a design consultant who played a key role in helping get the project back on track after the cost overrun was discovered, “initiated a design-build process” that enabled T officials to cut the project’s projected costs by $700 million,” the company said in a press release.

One key shift was scaling back the scope of the planned Green Line extension stations. While the previous plans had called for enclosed, fully heated and cooled stations, the revised plan slimmed that down to outdoor stops with canopies.

“We were brought in as part of the overall team to assess the existing project when it was halted in 2015,” said Jeff Tubbs, principal and project director at Arup. “We helped develop the value engineering solutions.”

Arup also looked closely at whether all the bridge replacement work along the route was needed.  In some cases, proposals for major bridge reconstruction and replacement projects were scaled back or stopped.

In one case, instead of doing extensive work widening an existing bridge to provide a pedestrian pathway, Arup opted to build a new, and less extensive, pedestrian bridge alongside the current bridge.

“There was a lot of bridgework,” said Anil Patel, associate principal in Arup’s Boston office. “We looked at the bridges and assessed what bridges could be left in place without major reconstruction.”

GLX Constructors spent the last few months putting finishing touches on the Medford branch— including testing and integrating “track switches, power lines, signal equipment, and digital communications between the Green Line's Union Branch, Medford Branch and MBTA's operations and control center,” according to the agency.

Along with helping value engineer the project and control costs, Arup also worked with T officials to implement the design-build approach, Tubbs said.

“It was the first of its kind of its scale in Massachusetts” to use the approach, he said.

 In other MBTA news, Skanska USA Civil Northeast and D.W. White, its joint venture partner, have completed the first phase of the  South Coast commuter rail extension to Taunton, Fall River and New Bedford—the only cities within 50 miles of Boston not to have a commuter rail station.

The firms built 12 miles of new track, two new stations in Freetown and Fall River Depot, seven bridges, six layover facilities, including a crew building, and other infrastructure, the contractors said in a press release.