A poor kid in the America that Ronald Reagan extolled could end up a movie star, a millionaire, president of the United States -- or, in his case, all three. That storybook life turned its last page yesterday with a funeral fit for a king.

Beneath the towering vaults of Washington National Cathedral, about 3,700 mourners -- leaders of government, heads of state, captains of industry, brokers of power -- sat rapt as the 40th president, who died last Saturday at 93, was commemorated by his admirers and commended to his God.

The pomp was nearly unprecedented in American annals, more than two extraordinary hours of thundering organ, swelling chorus, haunting silences and eloquent prayers. Eulogies were spoken by two presidents and two prime ministers.

"Ronald Reagan belongs to the ages now," said President Bush, echoing words once spoken upon the death of Abraham Lincoln, "but we preferred it when he belonged to us."

After the funeral, the late president's body rode one last time to Andrews Air Force Base and one last time home to California aboard a presidential jet. He was buried near sunset on the grounds of the Reagan Presidential Library in Simi Valley, in a simple service featuring tributes from his three surviving children. Former first lady Nancy Reagan, stoic through nearly a week of somber rituals, surrendered to her grief after being handed the flag that had covered her husband's coffin.

So ended the nation's farewell to a man judged by fans and critics alike to have ranked among the most consequential presidents of the past century, a man credited by former British prime minister Margaret Thatcher yesterday with having "won the Cold War."

Washington's first state funeral in more than 30 years -- the first held in the cathedral since 1969 -- came off without incident and caused less disruption than some had feared. Security at the invitation-only ceremony was tight but not oppressive, and D.C. police reported few traffic jams despite the comings and goings of scores of motorcades. Crowds along the route from the Capitol, where more than 100,000 people visited Reagan's coffin as it lay in state, were easily managed.

Under gray, sprinkling clouds, a time capsule opened, and out stepped the men and women who strove and clashed, rose and fell, won and lost in an age that seems long ago and far away. Former president Gerald R. Ford, who beat back Reagan's bid for the 1976 Republican nomination, chatted with former president Jimmy Carter, who lost to Reagan four years later.

The small, aged frame of former defense secretary Caspar Weinberger belied a handshake still tight as a vise grip. Former secretary of state Alexander Haig still likes his suits cut snug and styled a bit flashy.

In from the cold came such sinning Reaganauts as budget director David Stockman, who spilled the beans on the Reagan administration's failure to pay for its tax cuts, and national security adviser Robert McFarlane, who executed the arms-for-hostages exchange that became known as Iran-contra. Welcomed inside was former representative Kent Hance of Texas, a card-carrying Reagan Democrat who once whipped a young challenger named George W. Bush.

Bygones were bygone.

At least they were inside the cathedral, where United Nations Secretary-General Kofi Annan, who opposed the Iraq war, chatted animatedly before the service with the pro-war British prime minister, Tony Blair. Outside, there were a few protesters scattered among the curious and the reverent along Wisconsin Avenue NW. The District's Anti-War Network, for example, held signs cataloguing Reagan's "victims": the poor, El Salvador, people with AIDS and so on.

In his eulogy, President Bush noted that Reagan was never afraid of controversy; indeed, he was the standard-bearer of a conservative assault on the New Deal orthodoxy that once dominated Washington.

Thatcher concurred: "Ronald Reagan knew his own mind," she said in a tribute videotaped several years ago when her voice began failing. It was played in the cathedral as she sat listening, her face fixed in that familiar look of steely dignity. "He had firm principles and, I believe, right ones. He expounded them clearly. He acted upon them decisively."

But a state funeral is only partly about a president. It is also about a nation. Depending on the planners and the times, the rituals can emphasize majesty or the common touch. Reagan and his supporting crew were masters of every variety of public event; they put Hollywood's production values at the service of the presidency as never before. The president who promised to restore American greatness and confidence was especially partial to the sweeping, the stirring, the spectacular.

So his team pulled out all the stops.

A funeral years in the planning -- Nancy Reagan met every six months or so with key advisers to update preparations -- began with the gradual arrival of the guests, who had colored dots discreetly marked on the back of their tickets. Black dots sat way in the back; status-conscious Washingtonians soon figured out that orange was better, red better still and yellow quite exalted. Twenty-five heads of state converged on the cathedral, and 11 former heads of state, and 180 ambassadors or foreign ministers.

At 10 a.m., the U.S. Marine Corps Chamber Orchestra began playing Bach, but the crowd kept talking, glad-handing, back-slapping old friends, strange bedfellows and would-be allies. Many people fell naturally into the capital's distinctive conversational pose: side by side but facing slightly apart, talking to one another while scanning the room for bigger fish.

The floral displays were enormous and profuse, like small white trees. The sea of dark suits was dotted with ceremonial robes on foreign leaders and a few women in GOP gold.

By 10:20, the former presidents had arrived: Ford, Carter, the elder George Bush and Bill Clinton, who rested his hand on Afghan President Hamid Karzai's shoulder as his Supreme Court appointees, Stephen G. Breyer and Ruth Bader Ginsburg, chatted nearby.

At 10:45, the crowd was called to its seats as the orchestra played a segment of Mozart's "Requiem." The U.S. Armed Forces Chorus launched into two lush and complex anthems by the English composer William H. Harris; soon, the enormous church filled with the buttery tenor of Ronan Tynan singing Schubert's "Ave Maria."

Then a hush descended. Discreetly placed television monitors showed the arrival outside of the hearse bearing Reagan's coffin and the motorcade carrying his family. A bell tolled once, hauntingly. The faint sound of "Ruffles and Flourishes" was heard from outside, and the congregation rose as one for "Hail to the Chief" at dirge tempo.

The official service started five minutes ahead of schedule, and by 11:27, the coffin, weighing more than 700 pounds, was moving slowly down the center aisle, borne by eight strong servicemen. They moved in silence, led by two boys and a girl bearing the cross and candles, then by the Joint Chiefs of Staff decked with ribbons and stars. The Reagan family arrived last, as the coffin was placed on a red bier in the center of the cathedral, Reagan's head to the west.

Rabbi Harold Kushner, author of "When Bad Things Happen to Good People," read a passage from the Book of Isaiah, first in Hebrew then in English. Justice Sandra Day O'Connor, appointed by Reagan to be the first woman on the U.S. Supreme Court, read from John Winthrop's 1630 sermon to his fellow Pilgrims aboard the Arabella bound for Massachusetts Bay Colony.

"We shall be as a city upon a hill," she intoned -- one of Reagan's favorite images -- "the eyes of all people are upon us."

Quite powerful -- but, as Reagan liked to say, you ain't seen nothing yet. After two verses of the elegant hymn "Jerusalem" sung by the Cathedral Choir, the organ roared to life and the boy sopranos floated their ineffable descant into the ether. Thatcher's face then appeared on the monitors to deliver her accounting of the work she and Reagan did together.

"Ronald Reagan was such a cheerful and invigorating presence that it was easy to forget what daunting historic tasks he set himself," she said. "He sought to mend America's wounded spirit, to restore the strength of the free world and to free the slaves of communism. These were causes hard to accomplish and heavy with risk. Yet they were pursued with almost a lightness of spirit."

Former Canadian prime minister Brian Mulroney portrayed an affable and humble friend. Former president George H.W. Bush got the congregation laughing. He remembered that Reagan once was asked, "How did your visit go with Bishop Tutu?"

"He replied, 'So-so,' " Bush said.

Bush also choked up, briefly, when he tried to sum up his personal relationship with a man he had battled for the 1980 Republican nomination. "As his vice president for eight years," Bush said, "I learned more from Ronald Reagan than from anyone I encountered in all my years of public life. . . . He fought hard for his beliefs. But he . . . never made an adversary into an enemy."

The elder Bush emphasized qualities of kindness, humility and good manners. His son, speaking in the same cathedral where he rallied the nation to war after the attacks on the World Trade Center and the Pentagon, chose to stress Reagan's resolve in the face of criticism.

"He acted to defend liberty wherever it was threatened. . . . When he saw evil camped across the horizon, he called that evil by its name," the president said. "There were no doubters in the prisons and gulags where dissidents spread the news, tapping to each other in code what the American president had dared to say. There were no doubters in the shipyards and churches and secret labor meetings where brave men and women began to hear the creaking and rumbling of a collapsing empire."

Soon, the stony expanse of the cathedral was ringing with the "Battle Hymn of the Republic" -- not some somber version, but the rousing arrangement made popular by the Mormon Tabernacle Choir. Former senator John Danforth of Missouri, an Episcopal priest, called on Americans to bring light to a world dark with terror and chaos. Tynan gloried in the old hymn "Amazing Grace." The congregation lost its voices in the organ ebullient "Ode to Joy."

And, to muffled drums, the flag-covered coffin was carried back into the day.

Near 1 p.m., the cathedral began to empty. President Bush stopped to shake hands with his predecessor, Clinton. Bush's opponent in the bitter election of 2000, Al Gore, left his seat in front of Bush political strategist Karl Rove. Liberal Kennedys filed out not far from proto-conservative William F. Buckley Jr. Left and right, old and young, high and low: Just behind comedian Joan Rivers walked Polish anti-communist hero Lech Walesa.

So much symbolism, you might say.

Yet, as Mulroney explained, quoting former French president Francois Mitterand, being president of the United States is not just a job; it is a role. In death as in life, Ronald Reagan reminded the world that symbols matter.