SAN FRANCISCO – The sidewalks of downtown San Francisco were crowded with revelers Sunday as the city marked its 42nd year celebrating the lesbian, gay, bisexual and transgender community.

More than 200 floats, vehicles and marching bands were taking part, including a contingent of uniformed San Francisco police officers and sheriff’s deputies who waved rainbow flags and received shouts of encouragement as they marched down Market Street, San Francisco’s main thoroughfare.

Former San Francisco Mayor Willie Brown waved as he rode by in a yellow convertible. A jail bus, adorned with rainbow banners, blared its siren. The Gay Asian Pacific Alliance, LGBT for Obama, Out4 Immigration and Marriage Equality USA were among the marchers.

Crowds of several people deep lined the sidewalks on both sides of Market Street, and the crescendo seemed to increase as two men walked by hand in hand waving a sign that read “Frank and Joe, 12 Years Together.”

Jeff Haas said he and his wife, Susie, have been coming to watch the parade since the first one in 1968, missing only a few years in between.

“I’m really proud of the city and I think it’s wonderful that we continue to celebrate this,” Susie Haas said.

Organizers said San Francisco’s weekend events are the largest LGBT gathering in the nation, but thousands of attendees were also celebrating in Chicago and New York City, where parade-goers are toasting the anniversary of the state’s same-sex marriage law.

In Chicago, large crowds gathered for the annual Chicago Pride Parade on the city’s North Side, with many saying it was time for Illinois to allow gay marriage.

Chicago police said there were no reports of trouble so far. Last year, several floats were vandalized before the parade began.

New York’s march exuded diversity, from grand marshal Cyndi Lauper to the mayor, the police commissioner and the governor.

“New York is a place where you can do whatever you want to do,” Mayor Michael Bloomberg declared before he joined the Fifth Avenue parade. He said he had a message for the rest of America: “The government should get out of your personal life.”

Hundreds of thousands of spectators crowded sidewalks a dozen deep, cheering and waving rainbow-colored flags for the annual festivities one year after New York Gov. Andrew Cuomo signed the Marriage Equality Act into law.

The governor appeared Sunday with his girlfriend, Food Network chef Sandra Lee.

City Council Speaker Christine Quinn came as a newlywed, married last month to longtime partner Kim Catullo.

“A year ago, I was walking with my fiancee,” Quinn said. “Today, I’m marching with my wife, my father and the mayor.”

In San Francisco, some parade-watchers reflected the same offbeat and unconventional attitude that has made the city famous, with occasional groups of women walking by virtually topless, accompanied by men in skimpy attire.

Angel Nava, 19, of Sacramento, Calif., stood with his arms crossed, apparently chilled, as he watched the procession, while dressed only in orange-colored shorts.

“It’s my first,” he said of the parade. “I think all these people are beautiful.”

San Francisco Mayor Ed Lee was due to speak at the city’s Civic Center — near the parade’s end-point — later Sunday. He was to appear not far from where gay rights activist and San Francisco City Supervisor Harvey Milk famously addressed gay pride celebrants more than 30 years ago.