Mayor Anthony A. Williams announced yesterday that the city has reached an agreement that requires local unions to hire and train hundreds of District residents for the construction of the new baseball stadium.

Williams made the announcement under a sweltering sun near home plate at Robert F. Kennedy Memorial Stadium, where the Washington Nationals currently play, surrounded by more than 100 union members in the construction trades who are hoping to get a piece of the $535 million project.

The agreement, struck after nearly a year of closed-door sessions, essentially requires that bidders either have union shops or agree to have their workers join a union in order to participate. The agreement will require the approval of the D.C. Sports and Entertainment Commission.

But the mayor said that's a small concession because the unions agreed that half of all apprentices hired will be city residents, that union members who live in the District will get dibs on every job and that the local unions will create a summer program for city youth. Williams said the deal is additional proof that he was right to lure Major League Baseball back to Washington.

"The return of baseball has proven to be a resounding success," he said. "The team is playing well. The Nats are in first place. You hear people talking about it on the Metro. All of us had a dream for what is happening. And it's happening."

But the euphoria inside RFK was nearly drowned out by protesters gathered outside the stadium, chanting and continuously blaring the horns of heavy construction equipment. They said the agreement will cost the city money, result in delays and cost overruns, and hurt the very residents it purports to help. The fear is that once the project is over, black workers and other minorities will have gotten little, if any, of the project money.

"This is a political payoff for helping [the mayor] in the last election," said Mark Hall, vice president of the Capitol Area Minority Contractors and Business Association, which has sent two mailings in recent weeks urging residents to reject any "union-only" stadium project labor agreement such as the one announced yesterday. One of the mailings featured a character dressed as an umpire behind home plate, yelling "Yooooooou're OUT!" and claiming that because most D.C. workers are not union members, they won't get the stadium jobs.

"It just doesn't make sense," said Adam Prill, board chairman of the Associated Builders and Contractors of Metropolitan Washington, which represents more than 500 nonunion private contractors and suppliers throughout the region. Prill said his members agree with the need to provide worker training and hire city residents.

But those things, Prill said, are achievable without forcing workers to join a union. "The city has gutted its vo-tech programs and failed miserably in providing workers with life skills," Prill said. "We all agree with the social part of it and providing city residents with jobs. You can't do that by excluding the majority of [companies] who provide the jobs."

Joslyn N. Williams, president of the Metropolitan Washington Council AFL-CIO, said that despite what critics say, the agreement is a victory for unions and residents. He said workers hired under the agreement -- as with most union workers -- will earn more than their counterparts not affiliated with a union. To ensure that small and minority businesses are not shut out, the agreement applies only to contracts of more than $10 million.

Those involved acknowledge that the process will not be easy. Many unions and private contractors have not attracted large numbers of city residents as employees and will need apprenticeship programs to increase those numbers. The new agreement sets up an independent board to ensure that those hired meet their pledge.

The goal is to produce more success stories such as Eric Gross, 37, who went from earning $7 an hour working on the city's convention center to earning more than $22 an hour through an apprenticeship program. "It did a lot for me," Gross said.