There were American flags on the backs of uniform jerseys, flags on baseball caps and batting helmets, and flags fluttering throughout the stands. There were moments of silence and renditions of ''God Bless America.'' There were tears, there was relief, there were unexplainable feelings and, once again, there was baseball.

A sea of red, white and blue, solitude and song marked the return of Major League Baseball to six stadiums last night after a six-day hiatus in response to the terrorist attacks on the United States last Tuesday. Baseball mourned with the thousands who lost loved ones, it waited and it finally returned, hoping to provide even the slightest emotional jolt to a nation that is still shocked, confused and hurt.

Yesterday's games ended a numbing and extraordinary period in which no major sporting events were played for almost a week. Players play, managers manage and fans are fanatical, a routine that is usually impenetrable in professional sports. But this was different. The games are usually a way for people to escape from reality for a few hours and scream about a homer or at an umpire, but this time there was no escaping the horrific events in New York, Washington and southwestern Pennsylvania. Everyone, and everything, stopped. Now, gingerly, everything is starting again.

''I really hope that as a social institution we're able to provide some, some stability,'' Commissioner Bud Selig said. ''In this whole healing process, I hope we can play a small role. I'll be very grateful if we played a small role with other social institutions in helping bring this country back.''

In addition to the red, white and blue that blanketed each ballpark, there was an extra layer of blue with the presence of more police officers.

Kevin Hallinan, baseball's security chief, said each park had been inspected before the gates opened. In some cities, bomb-sniffing dogs were used to check facilities. Hallinan said teams were instructed to be more vigilant in securing the areas around the ballparks, especially the parking lots. Fans were no longer able to bring knapsacks or coolers into games. Some players had to show photo identification to get to work.

''We've done a lot of work and I'm confident with our preparation,'' said Hallinan, who later made a reference to Mayor Rudolph W. Giuliani. ''I think baseball can play a big part in the recovery. I think people need something. We have to move on to some sense of normalcy, as the mayor said. Not that we'll forget the people, but I think the people who were casualties would want us to move on.''

Phillies center fielder Doug Glanville said he felt safe about playing at Veterans Stadium in Philadelphia last night.

''You've got to play,'' Glanville said. ''You going to run away? That's what they want you to do. The country is looking over their shoulder in a lot of ways. I believe you've got to live your life. There are a lot of dangers out there in the world. You can't let it paralyze you.''

Selig put into effect several tributes to those killed or injured in the attacks, as well as those still missing, including having a flag on the uniforms, the caps and helmets, too. Baseball planned to distribute flags to every fan at yesterday's games and again for the teams who resume play today.

But Pat Courtney, a spokesman, said baseball needed about 400,000 flags and that it was having difficulty buying such a large quantity. In fact, the Pirates distributed ''I Love New York'' buttons to fans because their flags did not arrive in time.

Before games, teams have been instructed to observe a moment of silence, something that will continue indefinitely, and every uniformed member of the team must be on the field. Selig has also required teams to play ''God Bless America'' in conjunction with the national anthem before the game or instead of ''Take Me Out to the Ballgame'' for the seventh-inning stretch.

Some teams asked to wear black armbands on their sleeves, and that request was granted.

While adhering to baseball's suggestions, some teams added their own tributes. So a police officer sang the national anthem in Los Angeles, a bishop led a prayer service in Pittsburgh and a Hall of Fame broadcaster recited an original poem in St. Louis. Youppi, a mascot, was prevented from doing his usual dance on the dugout roof in Montreal, commercials were anathema in Philadelphia, and the Arizona Diamondbacks and Colorado Rockies stood shoulder to shoulder while a gigantic flag was unfurled at Coors Field in Denver.

The Mets wore police, fire and emergency medical services caps onto the field before their game against the Pirates at PNC Park. As Donald W. Wuerl, the Roman Catholic bishop of Pittsburgh, led a prayer service, John Franco's eyes moistened. The Mets' players had to show photo identification to enter the park, something none of them could ever remember doing.

Before the Phillies played the Atlanta Braves last night, they played a videotape of baseball highlights with ''God Bless the U.S.A.'' as the soundtrack. The Phillies suspended commercials on their radio and television broadcasts and instead played public-service announcements for the Red Cross and the Salvation Army. Atlanta Manager Bobby Cox said he expected there would be ''knees buckling'' during the emotional evening.

A Los Angeles police officer, Rosalind Iams, sang the national anthem at Dodger Stadium.

In St. Louis, more than 500 police officers and firefighters ringed the warning track during a pregame ceremony that included Jack Buck's poem. Chants of ''U-S-A, U-S-A!'' rang out from stadium to stadium.

Monique Giroux, the Expos' director of media services, said the team used local police officers and firefighters as flag bearers during the national anthems, performed no game promotions during the game and offered a video tribute to those affected by the attacks.

She ended a conversation with a New York reporter by softly saying, ''We share your grief.'' That alone said so much.

Photos: The Cardinals' Eli Marrero tagged out the Brewers' Jose Hernandez at the plate in St. Louis. Last night's games were baseball's first in a week.; Mark Loretta of the Milwaukee Brewers prepared to bat last night at Busch Stadium in St. Louis. (Photographs by Associated Press)(pg. C17)