Bob Nightengale

USA TODAY Sports

Major League Baseball and the players union, knowing there was far too much at stake for an impasse, agreed to a new five-year collective bargaining agreement Wednesday night less than four hours before their current deal expired.

The deal, announced late Wednesday but still needing ratification by the owners and players, means there will be 26 consecutive years without a work stoppage since the 1994-95 players’ strike that cancelled the 1994 World Series.

Commissioner Rob Manfred voiced optimism all along that a labor deal would be consummated before the deadline, and the two sides agreed to the structure of a deal with only details to be finalized. The owners have been told they will be briefed Thursday on the deal.

The last obstacle was agreeing to a new luxury tax payroll threshold, with penalties significantly increased for clubs that grossly exceed the limit. The tax will be assessed for teams with payrolls exceeding $195 million in 2017, up from $189 million this year, increase to $197 million in 2018; $206 million in 2019; $208 million in 2020 and $210 million in 2021. It still leaves the Los Angeles Dodgers, New York Yankees, Boston Red Sox and Detroit Tigers over the limit in 2017.

The tax rates start at 20% for first-time offenders, 30% for second offenders and 50% for third-time offenders, according to the Associated Press. There also will be a surtax of 12% for teams $20 to $40 million over the luxury tax threshold, and as much as a 90% tax for teams that are more than $40 million more than the threshold.

The day MLB changed forever: When Reggie Jackson struck it rich

The new deal, which has no major changes from the previous agreement, still will not have an international draft, but instead a $6 million cap on teams' annual international spending. There also will be no increase to the 25-man roster, with teams permitted to have a 40-man playing roster in September.

There will be subtle changes to free agency, however, in that players will be virtually unrestricted. Teams will no longer forfeit a first-round draft pick when signing free agents. If a team is under the luxury tax, it would lose a third-round draft pick when signing a player who rejects the qualifying offer. If a team is over the tax, it would lose a second- and fifth-round pick and $1 million in international bonus money.

The team that loses a free agent with a qualifying offer will receive a pick, according to Fox Sports, only if the player receives a contract worth at least $50 million. The pick the team receives will depend on its market size.

Those changes won’t take effect until the free agent class of of 2017.

And despite all of the posturing and veiled threats, there really was no chance of a stalemate, let alone a lockout or work stoppage, not with an industry expected to generate $10 billion this year, and with Game 7 of the Series the highest rated baseball game in 25 years.

Simply, no one was going to be foolish enough to walk away from this golden goose.

Once the agreement is ratified by both parties, baseball's off-season can continue just as it was scheduled to swing into high gear. The game's off-season carnival - the winter meetings - begin on Monday outside Washington D.C., now with assurances that team executives and agents can wheel and deal without the specter of a lockout hovering.

Sure, negotiations went slower than anticipated. In fairness, this was a new gig for union chief Tony Clark, negotiating his first collective bargaining agreement. This was also the first CBA with Manfred as commissioner instead of lead negotiator, now charged with appeasing 30 owners.

Yet, when they sat down across from one another with around-the-clock meetings in Irving, Texas, this week, they managed to settle their differences quite easily, wrapping up negotiations that began in earnest in March.

Hot stove: MLB 2016-17 free agent tracker

There still are details remaining, such as a likely boost in the minimum salary, currently $507,500. The regular season, beginning in 2018, will start five days earlier, providing more off days. There will be earlier start times for teams on travel days with day games the following day. There will even be increases to meal allowances on the road.

It’s unknown whether penalties will be stiffened for players violating the joint drug agreement or domestic violence policy, although both sides have been willing to alter those policies during the course of past CBAs.

These details will surface in coming days, or weeks, but for now, there is one certainty.

Baseball will have labor peace, 26 consecutive years and counting, with the game never having been more healthy, or prosperous.

PHOTOS: Top MLB free agents