The National Basketball Association and the NBA Players Association agreed in principle today to a four-year contract, thus averting a strike scheduled to begin Saturday.

"We're in this sport together and this agreement proves it," said NBA Commissioner Larry O'Brien, who participated in the negotiations and described the settlement as "a landmark labor agreement in professional sports."

The agreement will give the players 53 percent of the NBA's gross revenues beginning in the 1984-85 season, set team salary maximums and minimums, increase the minimum players salary, provide for a form of revenue sharing to help financially troubled teams and institute other steps aimed at giving the sport a more competitive balance of power.

Forward Junior Bridgeman of the Milwaukee Bucks, who was part of the union negotiating team, said that as late as Wednesday he felt there would be a strike. "Things just started falling into place after that. Both sides started seeing the other one's point better."

"The key to the agreement, on our part, is that we share in the revenues of the league, but we keep free agency, as well," said Larry Fleisher, general counsel for the players association. "Even with the shared revenues, the players still have individual negotiating rights."

The league had been without a collective bargaining agreement since the old one expired June 1.

The two sides met twice Wednesday and worked out the final details this morning, only moments before the NBA's Board of Governors voted, 22-1, to accept the agreement. It was not known who cast the dissenting vote.

Fleisher said the player representatives will meet in New York Monday and the players will vote Tuesday or Wednesday. "I would think that ratification is only a formality," he said.

"I think this is the most important thing that has happened to the NBA since the merger and it may be even more important than that," said Abe Pollin, the Bullets' owner who is chairman of the league's labor relations committee. "It takes a lot of craziness out of the sport. Teams can now plan their futures better and have some projections on where they're going, and it's going to make the game more competitive for the fans."

Next season, the salaries of the teams with the highest payrolls--Los Angeles, New Jersey, New York, Philadelphia and Seattle--will be frozen at current levels. The other teams will have no salary cap or minimum.

The guaranteed compensation, or shared revenue plan, will go into effect at the start of the 1984-85 season.

At that time, a cap will be placed on the amount each team can spend on player salaries and benefits. Teams at or above the cap can't bid for free agents or trade for players if it would increase their team salaries.

The amount of the cap will be determined by the percentage of the defined gross receipts the players will receive (53 percent), divided by 23 (the number of teams in the league). The cap cannot be lower than $3.6 million in 1984-85, $3.8 million in 1985-86 and $4 million in 1986-87.

A team at or above the cap will not be allowed to renegotiate with a player under contract, but it can match any offer sheet extended to one of its players becoming a free agent, even if doing so would put it above the cap.

If a team is over the cap, any waived, retired, or injured players may be replaced at 50 percent of what the player was making, even if it keeps the team above the cap.

The players are guaranteed 53 percent of the gross receipts taken in by the teams. The gross receipts have been defined as the sum of the regular season gate receipts, revenue from all network, cable and local television and radio contracts and net preseason and playoff revenues. The players also accepted a flat sum of $1 million a year in lieu of ancillary revenues such as parking and program and concession sales.

Each team will be required to spend a minimum amount each year on player salaries and benfits. The "floating mimimum" will be computed in advance of each season in accordance with a formula based on projected salaries and revenues aimed at paying no more than 53 percent to the players.

Because teams can remain at their existing payrolls, even if they are above the cap, it is virtually impossible to predict what the minmum will be, but it is expected to vary from year to year and the gap between the maximum and minimum is expected to decrease each season.

Fleisher said that he expects the minimum in the first year of guaranteed compensation to be about $3 million to $3.2 million. NBA players now average $246,000 a year.

If the formula minimum exceeds the amount a team has at its disposal to spend, the difference will be made up from a pool of shared revenues.

The Bullets, with a payroll of about $2 million, will have to spend an additional $1 million to $1.2 million on salaries to reach the minimum.

"Each team will have to spend the minimum, no exceptions," said David Stern, general counsel for the NBA. "What this does is make teams in the smaller markets now able to compete for players."

The agreement will help rookies. A team under the cap can sign a rookie to any salary it likes, as long as it remains at or below the cap.

A team at or above the cap can sign a rookie to only a one-year contract at the minimum salary, which will increase to $65,000 in 1984-85, $70,000 in 1985-86 and $75,000 in 1986-87. A first-round draft choice, however, could be signed to a one-year contract for $75,000 in any of those three years, or a team could adjust its existing payroll below the cap and sign the rookie to a long-term contact for more money. If the rookie signs the one-year contract, he would become a free agent the next season. The current minimum salary is $40,000.

The NBA said it will guarantee 253 jobs next season, even if there are fewer teams. That figure is derived by multiplying 23 (the number of teams now) by 11 (the present roster minimum.

Fleisher said he thinks there'll be 23 teams next year, but owner Jerry Buss of the Lakers does not. "I would say that one, two or three teams will fold," he said. Those teams in the most difficulty are Cleveland, Indiana and Utah.

Milwaukee center Bob Lanier, president of the players association, called the agreement "a settlement for all people" and said by having shared revenues, "there is a necessity for the players to do everything possible to make the game more interesting and to increase revenues."