A Secret Service counter-sniper patrols the rooftop of the Capitol Building hours before President Barack Obama delivered his inaugural address Jan. 21, 2013. (Peter Foley/EPA)

Four years ago, as one of the biggest crowds in Washington ­history gathered for President Obama’s first inauguration, the intense security imposed by cautious officials proved to be a nightmare for the public. Thousands complained of being trapped near checkpoints for hours, unable to move or watch the festivities.

On Monday, as Obama took the oath of office again and his inaugural parade flowed along Pennsylvania Avenue from Capitol Hill to the White House, the crowd-management headaches of 2009 seemed like ancient history. Although some problems occurred, they seemed far less severe — though crowds were also smaller.

Thousands of spectators lined Pennsylvania Avenue NW, standing six and seven deep, hoping for a glimpse of the president and first lady during the parade. Katrina Way, 34, of Jacksonville, Ark., stood behind at least five people shaking her legs to stay warm.

Way had tried two security checkpoints before finding one with a 30-minute wait that let her get to Pennsylvania Avenue in time. “I wanted to be a part of history,” she said.

Although she was not entirely satisfied with her view, “just being out here” is enough, she said. “You can sense hope in the air.”

The District is accustomed to heightened security, but a presidential inauguration means heightened restrictions on pedestrians and traffic, complicating the movement of hundreds of thousands of residents and visitors.

On Monday, the expansive precautions — coordinated from a suburban command center where representatives from 42 public safety agencies gathered — included more than 2,000 extra police officers from 86 jurisdictions across the country, who augmented the D.C. Police Department’s 3,900-member force.

Police sharpshooters manned downtown rooftops. Metro Transit Police also had help, with 150 officers from 15 transit agencies as far away as Oregon assisting the 450-member force. Several thousand National Guard troops helped secure the perimeter around the Mall, where traffic was blocked from an area encompassing more than 150 city blocks.

Metro closed three stations near or on the Mall for security reasons. Private jets were barred from flying into and out of Reagan National Airport and five other airports within a 30-nautical-mile radius of the city. And recreational boaters in the Potomac River could not come closer than six miles from the city.

A late surge of attendees swamped entrances at the gates for blue and orange ticket-holders about 10:30 a.m., leading to long lines and concerned faces — many remembering 2009. Crowds filing in from Union Station found lines three blocks long at the blue-ticket gate extending from the Russell Senate Office building toward D Street NE.

Outside the orange-ticket gate at First and and C streets NW, the line stretched two blocks and jammed the intersection at D Street as thousands gathered.

D.C. Police Chief Cathy L. La­nier said the initial crowds at three Metro stations near the Mall were worrisome about 7 a.m.

“There was a large group of people,” she said. But the crowd broke up quickly and the flow of people became steady. Lanier would not estimate the number of people attending the inaugural festivities, but said it was “a much larger crowd than I anticipated.”

“People are doing really well following the signs,” she said. “I’ve given lots and lots of directions to people out there today. . . . People are being very friendly. They are being wonderful.”

About 9:30 am, two women approached a police officer near the green-ticket security gate at Second and C Sts. NE to ask if officials planned to open more space inside. The women said they had arrived at 8:15 a.m., quickly made their way past security, then ran into an unmoving wall of people.

“You maybe went about 25 feet and that was it,” said one of the women, identifying herself only as Paula from New York.

A woman with her, who said she is from the District and gave her name only as Paige, said people were shoving and creating a “safety hazard.”

“I don’t know how many tickets they oversold, but it has to be a ton,” she said.

Officials from the inaugural committee did not respond to several calls seeking comment on the flow of visitors through the ticket gates.

Spectators trying to enter the parade route at 15th and F Sts. NW appeared to be out of luck. After a long line formed about 1 p.m., security officials stopped letting people in there after about 90 minutes. “A staff decision,” a security official said.

As hundreds streamed toward the green-ticket gate after 11 a.m, a few dozen headed in the opposite direction, most of them not having realized that they needed tickets to get past the gate. Angela Jenkins, a government worker from San Francisco, was among those with tickets who decided to leave anyway.

“Some of us can see it a little bit better from home,” she said with a smile.