"You are making history," the speaker intoned over a loudspeaker that didn't quite reach the last rows. Birds darted overhead, a tugboat trolled the harbor and more than 3,500 Baltimore children sat on the rolling lawns of Fort McHenry holding pieces of red, white and blue cardboard.

"Fifty years from now you will tell your grandchildren, 'I was at Fort McHenry when they made that human flag,' " said Baltimore Mayor William Donald Schaefer, speaking above the roar of the helicopters. A small boy pulled up a fistful of grass and tossed it at his neighbor.

"America is the greatest country God ever provided in the world," Schaefer continued, as unseasonably cool breezes whipped through windbreakers and sweat shirts. "Here you have an opportunity to go to school, get a job and own a house."

Friday is Flag Day, and today, as a prelude to festivities scheduled to be attended Friday by President Reagan, the National Flag Day Foundation decided to revive the Human Flag ceremony, which hasn't been held here since 1914. The foundation tried to revive it last year, but it was so hot that school was canceled, so the children couldn't come. Organizers tried to stage the event without them, but the placards blew away.

The weather was more cooperative this year, although the sun frequently hid behind the clouds. One of the 50 styrofoam stars broke as it was held aloft, but Jason Lambert of Hancock, N.H., one of 50 high school students flown in from each state by American Airlines as star holders, coped.

"I was just standing there holding it and suddenly I saw the sky," he said.

The 80 busloads of kids, all between 10 and 14, plus teachers and chaperones, filed onto a 255-by-135-foot field divided into 3-foot-by-3-foot squares. There they assembled over the course of an hour, trying to stay in their squares, while their teachers hoped no one would have to go to the bathroom. "They'll just have to hold it till it's over," said Margaret Miller, grimly.

"The idea of this event is that it's the best way to incorporate as many people of that age group and instill a patriotic feeling," said Delbert Adams, 29, cochairman of the event. Adams wore shorts and carried a bullhorn, which came in handy.

Fort McHenry is where Francis Scott Key during the War of 1812 saw the waving 42-foot-by-30-foot star-spangled banner that inspired him to write the words to what became national anthem. It was sewn by Mary Pickersgill, a 36-year-old widow who used 400 yards of wool bunting (imported from England) to make the flag. She laid it out in Claggett's Brewery, a nearby malt house. It now hangs in the Smithsonian under glass.

Key was approaching the fort on an American sloop flying a white flag when he was detained by British soldiers. He had come to plead for the release of an American doctor imprisoned on a British boat, and just as the enemy agreed to hand him over, they began to bombard Fort McHenry. Key saw the flag flying through the attack, from which the British later retreated.

All of these facts are contained in packets of information each child found waiting on the buses, along with a $5 gift certificate to the Merry-Go-Round clothing store. The children in the human flag were selected by their schools.

"We participate in things if we're good," explained Vonetta Deleon, 10, of P.S. 139. "We can't if we're bad. My teacher picked me because she thought I would behave."

Nicki Vandegrift, 12, from Hamilton Middle School, added that participation had a lot to do with "whoever got their permission slips back first." She added: "I'm not really sure what we're doing, but I really wanted to come. I mean, my mother's car wouldn't start this morning and I ran all the way over to Vicki's house to get a ride with her."

Vicki Welsh, also 12, wore heart-shaped sunglasses and dangling heart-shaped earrings, and noted that their teacher, Margaret Miller, was born in Hungary. "She's from Transylvania," she said. "She even has two moles on her neck like a vampire bite."

There were tall gangly kids and short runty kids, pimpled kids and dimpled kids. Some wore their Sunday best, but most wore pants and T-shirts or jackets with "Orioles" on the back. The girls played hand-clapping games and brushed their hair, and the boys made telescopes of their programs and bopped one another with them.

"If you don't sit down you won't get your Merry-Go-Round coupon," Adams told the crowd.

The placards were passed out, red, white and blue. "Red, RED!" a teacher yelled at two confused students, who were holding the wrong side up, looking like marshmallows on the end of a red line. The big moment was getting closer.

Richard Patterson, vice chairman of the National Flag Day Foundation, told them to "Praise God for this great morning, praise God for this great country and praise God for all you great children." He quoted Rudyard Kipling saying the flag was an emblem of "safety and freedom" (although Kipling was referring to another flag). The children listened and waited. One girl pulled her friend's hood down over her head.

They pledged allegiance to the flag, hands over hearts, and sang "The Star-Spangled Banner" with opera singer Melvin Lowery. The helicopters carrying television crews got closer and noisier. "What are you part of?" yelled Patterson to the crowd.

"A HUMAN FLAG!" they yelled back. It was time to stand up. They were told that when Lowery started to sing "America the Beautiful," they should raise their placards over their heads, showing the right color to the helicopters.

"Oh beautiful, for spacious skies," Lowery sang.

The placards went up, held overhead by small hands holding on against the wind. A few whipped away, but were caught.

The Human Flag.

The ranks held pretty well through the song, until the Fort McHenry cannon began booming. The kids started to squeal, a wave of delighted and fearful yells pouring out with each BOOM.

Then the placards were down and the lines breaking up. As hard as it had been to organize the arrival and performance, Adams said, getting the kids out would be worse. "Would the blue section please sit down," he implored.

A small boy danced his own boogaloo as the Stars and Stripes milled around him, cuffing each other and rolling their placards into telescopes. Adams was shouting at them to line up when he called the number of their bus. The helicopters roared away, leaving the sky to the birds and the clouds and the replica of Mary Pickersgill's flag flapping in the breeze.