(CNN) Fresh memories of a mass shooting in a gay nightclub loomed large over LGBT pride celebrations nationwide Sunday, two weeks to the day after a gunman killed 49 people in Florida.

Millions gathered in major American cities for annual celebrations of lesbian, gay, bisexual and transgender communities.

This time last year, parade-goers celebrated a major milestone with the nationwide legalization of same-sex marriage.

This year, heightened security measures and tributes to the 49 victims of the Pulse nightclub shooting in Orlando marked celebrations.

Despite the somber undercurrent, the spirit of jubilation prevailed throughout pride events, embodied by the multi-generational crowds awash in rainbows.

Even if the tone of events was muted, supporters said they took on a special meaning.

"I think it is an act of defiance on one level, to come out and say, 'We stand by our values: inclusion and love and tolerance,' " New York City Mayor Bill de Blasio told CNN on Sunday.

"There's a somber feeling obviously, and there's pain over what happened in Orlando, but the answer is not to run and hide. The answer is to stand up boldly, and that's what New York City is doing today."

Extra security

With the shooting in mind, law enforcement agencies across the country took additional steps to ensure security.

More than 20,000 people were expected to participate in New York's pride celebration, including Hillary Clinton . The NYPD expected the crowd of parade-goers to exceed last year's estimated size of 1.6 million, New York Police Chief of Patrol Carlos Gomez said.

Photos: The first gay pride parades Photos: The first gay pride parades People march into New York's Central Park during the nation's first gay pride parade on June 28, 1970. The event was held on the one-year anniversary of the Stonewall riots, when members of the gay community clashed with police who had raided the Stonewall Inn in Manhattan. Hide Caption 1 of 7 Photos: The first gay pride parades The parade was called Christopher Street Liberation Day. The Stonewall Inn is on Christopher Street. The riots at the gay bar and the protests that followed were a turning point for LGBT rights in the United States. Hide Caption 2 of 7 Photos: The first gay pride parades "At one point, I climbed onto the base of a light pole and looked back. I was astonished; we stretched out as far as I could see, thousands of us," one of the marchers, Fred Sargeant, told the Village Voice decades later. "There were no floats, no music, no boys in briefs. The cops turned their backs on us to convey their disdain, but the masses of people kept carrying signs and banners, chanting and waving to surprised onlookers." Hide Caption 3 of 7 Photos: The first gay pride parades A couple kisses after the parade in Central Park. Hide Caption 4 of 7 Photos: The first gay pride parades Several other U.S. cities followed with their own pride parades. Here, people march down Hollywood Boulevard in Los Angeles on June 29, 1970. Hide Caption 5 of 7 Photos: The first gay pride parades A crowd holds banners as they march in the Back Bay neighborhood of Boston in 1970. Hide Caption 6 of 7 Photos: The first gay pride parades People march in the Boston gay pride parade. Hide Caption 7 of 7

Total police presence was increased by about 25% over 2015, NYPD Chief of Department James O'Neill said without providing specific numbers.

The increased police presence was evident along the parade route from midtown Manhattan to Greenwich Village past Stonewall Inn, which President Obama recently named as the first national monument to LGBT rights . Thousand of uniformed and plain-clothed officers stood watch along the parade route and from rooftops, Gomez said.

Helicopters were deployed along with bomb-sniffing canines as a network of cameras monitored events in adjoining areas, Gomez said.

Additional community emergency response teams carrying heavy weapons and counterterrorism personnel equipped with radiation detection devices were posted along the route, he said.

"We have greatly increased counterterrorism efforts to act as a visible deterrence as well as a quick response capability," Gomez said.

Extra officers and private security guards watched over festivities in Chicago, where police took the rare step of keeping reporters and photographers from crossing parade barricades, according to CNN affiliate WBBM

In San Francisco, for the first time, this year's Pride Fest included a security checkpoint screening at every entrance, according to CNN affiliate KGO

"Our hearts are with Orlando. We think of them every day," San Francisco resident Cory Vaughn told the affiliate. "We have metal detectors, we're all being safe, but we're still looking over our shoulders."

Nationwide events

Amid the tributes and enhanced security, a mix of jubilation and reverence permeated celebrations worldwide.

Revelers in London and Milan, Italy took to the streets Saturday in brightly colored outfits to celebrate and pay tribute to the Orlando victims.

"The parade is festive and multicultural like never in the past years," London parade attendee Carlo Feudo told CNN. "This time we do need to be standing all together against hate and discrimination."

Events in New York and Chicago kicked off with moments of silence for victims of the Orlando shootings, a reminder that despite progress for LGBT rights "there is hate in the world," Chicago Mayor Rahm Emanuel said

The City of Orlando marched in New York's parade carrying 49 flags to commemorate the victims of the attack. Another group of 49 people marched in white in their honor.

An NYPD car bore the message "Our heart goes out to Orlando."

City of Orlando repping at the #NYCPride parade. There are 49 orange flags to commemorate the victims of the attack pic.twitter.com/ASuef7AuEF — David Shortell (@daveshortell) June 26, 2016

U.S. Rep Tammy Duckworth, who lost her legs in the Iraq war and uses a chair for mobility, rolled through the streets of Chicago with pride.

The annual tradition of marriage proposals continued in two countries.

In London, at least two couples got engaged. One was a pair of Metropolitan Police officers marching in the parade; another was an officer who broke ranks to propose to a crowd member.

In New York, two members of the FDNY got engaged to cheers from onlookers.

Barbara Poma, owner of the Pulse nightclub in Orlando, attended New York's event. She hoped the parade would allow members of the LGBT community to comfort each other through love and support.

"Orlando and the world's gay community are strong and united. We will not allow evil to prevail," she said.