Baseball Commissioner Bud Selig and union head Michael Weiner smiled and exchanged handshakes while others in the room dug into knishes and pigs in a blanket.

“The deal, which must be ratified by both sides and drafted into a formal contract, expands the playoffs from eight to 10 teams by 2013, lessens draft-pick compensation for free agents, expands salary arbitration by a few players and for the first time allows teams to trade some draft selections.”

NEW YORK — Baseball Commissioner Bud Selig and union head Michael Weiner smiled and exchanged handshakes while others in the room dug into knishes and pigs in a blanket.

Not exactly the kind of scene that played out in sports labor talks this year.

Baseball ensured itself of 21 consecutive years of peace at a time the NBA season might be canceled because of a lockout and the NFL still is recovering from its CBA negotiations.

"We've learned," Selig said Tuesday after players and owners signed an agreement for a five-year contract running until December 2016. "Nobody back in the '70s, '80s and the early '90s, 1994, would ever believe that we would have 21 years of labor peace."

The agreement makes MLB the first pro major league in North America to conduct blood tests for human growth hormone, allowing it during spring training and future offseasons but for now only studying whether it will be implemented during the regular season.

"MLB and the players union should be applauded for taking the strong step to implement the HGH test at the major league level to protect clean athletes," said Travis Tygart, chief executive officer of the U.S. Anti-Doping Agency. "This is great progress in MLB's effort to protect the integrity of baseball at every level."

The deal, which must be ratified by both sides and drafted into a formal contract, expands the playoffs from eight to 10 teams by 2013, lessens draft-pick compensation for free agents, expands salary arbitration by a few players and for the first time allows teams to trade some draft selections.

It also adds unprecedented restraints on signing bonuses for amateur players coming to the major leagues from high school, college and overseas, perhaps hurting MLB as it competes with the NFL and NBA for multisport talent.

"If I've got a great athlete, why am I going to go to baseball? I'm going to focus on the other sports," said agent Scott Boras, who has negotiated baseball's highest signing bonuses.

Following eight work stoppages from 1972-95, baseball reached its third consecutive agreement without an interruption of play. The agreement was signed three weeks before the current deal was to expire Dec. 11, the second straight time the sides reached a deal early.

Baseball seems to have learned the lessons of the 1994-95 strike, which wiped out the World Series for the first time in nine decades.

"I think our history is more important than what's happening in other sports," said Michael Weiner, who took over from Donald Fehr as union head last year. "It took a while for the owners to appreciate that the union is not only here to stay, but that the union and its members can contribute positively to a discussion about the game — about its economics, about the nature of the competition, about how it's marketed in every way."

Owners hope the changes will lessen the difference in spending by high- and low-revenue teams, much as the payroll luxury tax that began after the 2002 season.

"We feel that competitive balance is crucial to the product that we put on the field," said Rob Manfred, MLB's executive vice president for labor relations. "Every time I took a proposal back to the commissioner, his bellwether on whether that proposal was good, bad or indifferent is what it did for competitive balance."

As players Andrew Bailey, Andrew Miller, Carlos Villanueva and David Bush sat alongside the officials, the sides described other highlights that included: requiring players to play in the All-Star game unless injured or excused; expanding instant replay to include decisions on foul lines and traps, subject to an agreement with umpires; banning smokeless tobacco products during televised interviews by players, managers and coaches; requiring players arrested for DWI to undergo mandatory evaluation; and wearing improved batting helmets manufactured by Rawlings by 2013.