This was the visual they had dreamed about for years, for decades, for a lifetime. A woman standing on the wooden dais before the high-backed leather chair of the speaker of the House, the gavel in her hand, the American flag draped behind her.

And when Nancy Pelosi made American history yesterday and was formally elected speaker, the raucous cheers that rang through the House chamber came from young girls in Mary Janes, working women in business suits, elderly ladies carrying canes and more than a few men. For hours after the formal swearing-in, the ascension of Pelosi was the topic throughout the corridors of the Capitol. Several women said they looked forward to the State of the Union address later this month because Pelosi would be in the speaker's chair and a woman would share the television screen with the president.

"For our daughters and granddaughters, today we have broken the marble ceiling," Pelosi told cheering members of the House and their families who crowded into the chamber as the Democratic leader was formally elected speaker of the 110th Congress. "For our daughters and granddaughters today, the sky is the limit."

The day marked the Democrats' return to control of Congress after 12 years as the minority, and the celebrations started early and stretched late. Brunch plates clinked in the Library of Congress, party equipment rental trucks lined Constitution Avenue and bowls of shrimp and platters of finger sandwiches appeared in Capitol offices.

It felt like an inauguration and a homecoming, both at once.

"This is a woman's version of the presidential inaugural," said Donna Brazile, a Democratic consultant who ran Al Gore's presidential campaign in 2000.

The historic aspect of the moment seemed to transcend party.

"For more than 200 years, the leaders of our government have been democratically elected. And from their ranks, our elected leaders have always selected a man for the responsibility and honor of serving as speaker of the House. Always, that is, until today," said Rep. John A. Boehner, the Ohio Republican who was majority leader in the last Congress and who handed the gavel to Pelosi. "Whether you're a Republican, Democrat or independent, today is a cause for celebration."

Rep. Michael McCaul, a Texas Republican starting a second term, brought his son and four daughters to the floor for Pelosi's election and his oath of office. It didn't matter that the woman of the hour was a Democrat, he said. "It's a good role model for all women, and my daughters can see that they can get to the highest levels of government," McCaul said. The girls, ages 5 to 10 and dressed in identical black velvet and tartan dresses, displayed varying levels of understanding. "It's cool," said Caroline, 10.

Roz Wyman, the doyenne of California Democratic circles and a major backer of Pelosi, said it was hard to describe the importance of the day. "I don't think a lot of people grasp it," said Wyman, who watched the swearing-in from the visitor's gallery and had helped throw a women's tea for Pelosi on Wednesday that featured hundreds of female politicians, donors and activists. " I never thought I would see this day. . . . She's not George Washington, but she is at that seat and she got there because she had a lot of friends who cared, a great organization and she went out and worked for it."

It took nearly two hours for the members to elect Pelosi on a 232-202 party-line vote. They stood one by one, many delivering brief remarks along with their votes. "Just as the biblical Esther was called to save the nation, I cast my vote for another woman called for such times as these," said Rep. Bobby Rush, the Chicago Democrat and former Black Panther. Rep. Lynn Woolsey (D-Calif.) announced her vote for Pelosi was "for the future of all of our grandchildren and for world peace."

Pelosi sat in the center right section of the House, surrounded by her grandchildren and holding the youngest, 6-week-old Paul Michael, in a white blanket in her arms. She hugged and squeezed any other children who came within range and stood up to kiss a steady stream of well-wishers, including Sen. Barbara Mikulski (D-Md.), former Colorado representative Pat Schroeder and former transportation secretary Norman Mineta.

While the Democrats on the House floor were busy shaking hands, rubbing backs and congratulating each other, the Republican members largely sat quietly. Boehner left the chamber for long periods and Rep. J. Dennis Hastert (R-Ill.), the outgoing speaker, stood at the back of the chamber against a railing, hands in his pockets.

The visitor galleries above the House floor were laden with Democratic supporters, donors, lobbyists, women's rights activists and Californians. Sitting among the Pelosi family were several celebrities, including singers Carole King and Tony Bennett and actor Richard Gere, who also appeared at a Democratic fundraiser last night honoring Pelosi at the National Building Museum.

The accessory of the day seemed to be a baby or, if not available, a toddler. Rep. Rosa DeLauro (D-Conn.) carried her 2-year-old granddaughter, Rigby, who was sleeping. Kirsten Gillibrand of New York, one of the new House Democrats, toted her 2-year-old son, Theodore.

"This was a long road and we're finally here," said DeLauro, a Pelosi ally. "The barriers are gone."

The role model herself stood on the dais to swear in the entire House amid a clutch of children, including several of her own grandchildren. She was calm enough to let one of the younger girls hold the newest grandbaby, and she was focused enough to do her work amid their antics, a talent she perfected years ago as a mother of five and grass-roots political activist.