WASHINGTON — It has been a long time since Bon Jovi, Stevie Wonder, Bono and Bruce Springsteen were opening acts.

But Sunday afternoon, in front of a crowd of 300,000 sprawled far across the National Mall, these renowned singers were part of the introduction for the real star of the show: President-elect Barack Obama. In the days leading up to today’s inauguration, this city buzzed with excitement and celebration.

HBO’s two-hour event, “We Are One,” brought 37 celebrities, 12,000 portable restrooms and countless fans to the Lincoln Memorial and National Mall on Sunday. After Denzel Washington spoke on the importance of unity, Springsteen took to the stage with a rendition of “The Rising” amid cheers and howls from the huddled crowds. U2 played the Obama campaign song “City of Blinding Lights,” a selection Bono said Obama picked himself.

Martin Luther King III, Tom Hanks, Mary J. Blige, Samuel Jackson and Tiger Woods appeared onstage along with dozens of others to kick off Obama’s historic inauguration.

A day earlier, the crowds had yet to take to the streets in large numbers. Security personnel, though, were already present in strength: Over 20,000 military and law enforcement gathered here over the weekend to make sure today’s inauguration is safe and secure. Police cars lined almost every corner on and blocked off huge areas of the city as they gradually extended a secure perimeter around the Capitol. The security efforts were the shared responsibility of a myriad of federal, state and local agencies, including the Secret Service, the Capitol Police, the Park Police and the D.C. Metropolitan Police.

National Guard units also pitched in, as Humvees in tan and jungle camouflage stood next to blue-and-white police vehicles. The city seemed to be in a state of lockdown as dozens of uniformed soldiers could be seen marching down a deserted Pennsylvania Avenue on Saturday. The security net included the waters surrounding the city; the Coast Guard stepped up patrols with its fast patrol boats and said it planned to shut down all water traffic this morning.

By Sunday, the thousands of armed men were blocked from view by the hundreds of thousands of Americans who had come to witness history in the making. A full 48 hours before the Inauguration, the crowds were already in a state of celebration. All traffic was halted and crowds walked down the middle of Independence and Constitution avenues. Everyone was headed toward the National Mall, stretching from the Capitol to the Washington Monument to the Lincoln Memorial, where the concert was underway. Just returning from laying a wreath in Arlington National Cemetery for the nation’s war heroes, Obama was seated in the front row with his family.

The concert seating was limited to under a thousand, but the entire Mall was a sea of people crowded around 25-foot jumbotron televisions. The crowd cheered for the performers, and for actors such as Jamie Foxx, who delivered an impersonation of his vision of Obama’s speech. But above all else, it exploded whenever the Illinois senator was displayed on the monitor.

The people in the crowd, from a variety of states and countries alike, all seemed to recognize the especially historic moment. Samia Davis said she traveled with her family of six from Gainesville, Fla., to see the first African-American president.

“We came from hot weather to freezing weather, but we’re just thrilled to be here,” she said.

Jose Guillerez of Queens, N.Y., said he thought Obama’s presidency had special meaning for all minority groups, Latinos just as much as blacks. “It’s a message to us, too, that there can be a Latino president,” he said.

As Obama walked to the lectern to give his remarks, the crowd erupted into wild cheers. The president-elect’s speech introduced the theme of responsibility, an overtone his transition press office has said would also be a major topic within Obama’s 15- to 20–minute inaugural address Tuesday.

“In the course of our history, only a handful of generations have been asked to confront challenges as serious as the ones we face right now,” Obama said.

Not all of the weekend’s celebrations were held outdoors. Dozens of parties and balls were held throughout the weekend to commemorate the inauguration, such as the California State Society inaugural luncheon, where the top faces in Golden State politics gathered for lunch and a fashion show.

Similar parties for every state and interest group in the country were also underway and will continue all week. Sen. Chris Dodd of Connecticut held an “open house” for constituents on Monday, with his staff passing out freshly baked cookies. Later, Connecticut’s congressional delegation hosted a reception in the ornate Caucus room of the Russell Senate Office Building.

Indeed, whether in private dining rooms or at the foot of Lincoln’s statue, Washington is a city on holiday. Meanwhile, though, the president-elect had a speech to practice.

After all, Springsteen is a hard act to follow.

Zeke Miller and Clark Xue contributed reporting from Washington.