NEW YORK — Barry Bonds gave the San Francisco Giants the right to terminate his $15.8 million, one-year contract if he is indicted.

The unusual provision could set off a legal test between the individual player contract and the union's collective bargaining agreement. The language, included in the deal that was completed Monday night, is designed by the team to protect itself in case Bonds is charged in the federal government's steroids investigation.

Bonds' personal trainer, Greg Anderson, is in the Federal Correctional Institution in Dublin because he has refused to testify whether Bonds committed perjury when he told a 2003 grand jury he never knowingly used performance-enhancing drugs.

As part of the agreement, if Bonds is indicted, the Giants have the right to terminate it under two sections of the Uniform Player Contract, a baseball executive said Tuesday, speaking on condition of anonymity.

Under 7(b)(1), a team may terminate a contract if the player shall "fail, refuse or neglect to conform his personal conduct to the standards of good citizenship and good sportsmanship or to keep himself in first-class physical condition or to obey the club's training rules."

Section 7(b)(3) gives the team the right to end the deal if a player shall "fail, refuse or neglect to render his services hereunder or in any manner materially breach this contract."

In addition, the Giants have the less drastic option of converting Bonds' deal to nonguaranteed, the baseball executive said. Players withnonguaranteed contracts can be released before opening day for 30 or 45 days' termination pay, depending on the timing.

As part of the deal, Bonds gave up the right to ask the players' association to file a grievance if he is indicted and the contract is terminated. But nothing would stop the union from pursuing a grievance on its own.

Giants owner Peter Magowan declined comment.

Jeff Borris, Bonds' agent, said that the additional language in Bonds' contract would be unenforceable if the matter ever was litigated because baseball's collective bargaining agreement would take precedence. Because of that, Borris said the inclusion of the added provision is meaningless.

"Although it is not my policy to comment on the specifics of an individual player's contract, the reporting that Barry will allow the Giants to get out of his contract if he is indicted on the federal steroid investigation is inaccurate," he said. "The collective bargaining agreement governs the work relationship between the owners and players, not the Giants' unilateral assertions."

Bonds was at AT&T Park on Tuesday and held a meeting with about 100 people from the team's staff, Giants spokesman Jim Moorehead said.

"It was a meet-and-greet session," Moorehead said.

Bonds became a free agent after completing a $90 million, five-year contract, and the sides agreed to the financial terms of a new contract Dec.7. His new deal allows him to earn $4.2 million in performance bonuses: $500,000 for 250 plate appearances, $1 million each for 300, 375 and 450, and $700,000 for 525.

As part of the agreement, Bonds gets to use a luxury suite at AT&T Park for five games and gets five free lower box seats for all road games. He also gets a hotel suite on road trips.

AP sportswriter Janie McCauley in San Francisco contributed to this report.