PHILADELPHIA (AP) — On the Fourth of July 50 years ago, when homosexuality was considered a mental illness and a same-sex couple's public declaration of love put their lives and livelihoods at risk, about 40 people took a stand by staging a peaceful protest in front of Independence Hall.

Philadelphia's Independence Day festivities this year will include the usual concert, fireworks, parade and public reading of the Declaration of Independence, but will also mark the city's important place in the history of America's gay rights movement with events billed as the 50th anniversary of the lesbian, gay, bisexual and transgender rights movement.

While these weren't the first public protests for gay rights, nor were very large when compared with demonstrations that came later, many LGBT activists say they are worthy of being celebrated as stepping stones to 1969's Stonewall riots in New York City, a turning point in gay rights.

Philadelphia participant John S. James, now 74, said he was relieved when no one staged a counterprotest that day. Still, the mood of the time was summed up by the comments an ice cream vendor made to him.

"He said something like, 'I never thought I'd be doing this,' and it was obvious he meant doing business with homosexuals," said James, who now lives in an LGBT-friendly senior apartment building in Philadelphia.

James didn't want his photo taken that day for fear of losing his government job. Yet among the images is one of James holding a sign that says, "Homosexual citizens want their right to make their maximum contribution to society." James kept his position — possibly because there was very little media attention given to that march and the ones that followed.

"What they were potentially subjecting themselves to far outweighed the benefits," said Malcolm Lazin, executive director of the nonprofit LGBT rights organization Equality Forum. "At the time, there were at most 200 people in the U.S. who identified as gay activists. Very few gay people were willing to rock the boat, because it could always get worse."

Over the four years that followed the protest, a growing number of people took part in the "Annual Reminders" outside America's birthplace, where both the Declaration of Independence and U.S. Constitution were debated and signed.

Even their supporters thought they "were out of their minds," said Lazin, who is organizing a series of events over the holiday week to mark the half-century anniversary of the protest, which is also recalled in a state historical marker that went up a decade ago.

Protest organizer Frank Kameny set the rules that "men had to wear suits and women had to wear similar formal wear," James said.

"We had to show respectability because of the public sentiment towards gay people at that time," he said.

The Associated Press covered the third Annual Reminder in 1967. It noted the protesters were "neatly-dressed" and carried "hand-painted signs saying, 'Homosexual American citizens, our last oppressed minority' and 'Fifteen million U.S. homosexuals ask for redress of grievances.'"

Some of the planned events this Fourth include a ceremony in front of Independence Hall, parties and legal panels. There will also be a VIP lunch with Judy Shepard, the mother of slain gay man Matthew Shepard, and Edie Windsor, the plaintiff in the Supreme Court case that struck down parts of the Defense of Marriage Act. Museums are also showing special exhibits.

The Philadelphia celebration comes at a momentous time in gay history and is a stark reminder how different things were just 50 years ago.

Same-sex couples can now marry in a majority of states. Hate crimes based on sexual orientation or gender identity are punishable by federal law. States, counties and cities are adding the LGBT community to the list of those protected under employment discrimination statutes. Openly gay candidates are regularly elected to public office.

In Philadelphia, just a stone's throw from the protest site lies the area everyone knows as the Gayborhood, the heartbeat of the city's LGBT culture, where gay bars line the streets and rainbow "pride" symbols pepper storefronts and street signs. Crosswalks will be painted in rainbow colors to commemorate the protest.

But back in 1965, gays and lesbians were prohibited from working in federal government under an order signed by President Dwight Eisenhower a dozen years earlier. Those kinds of rules were one reason Marj McCann, who worked for the city of Philadelphia at the time, watched that first protest but didn't participate.

"I was hiding behind a tree," said McCann, 75, who lives in the Philadelphia suburbs with her partner. "We were all hiding, passing in the way we dressed and carried ourselves."

The Rev. Robert Wood took part in the 1965 protest and many others wearing his clerical collar. While most were peaceful, there were always name-callers, he said, and he never got fully used to being denounced with words like "sinner" and other derogatory terms.

"Men and women, you could see the viciousness in their faces and their voices," said Wood, now 92 and living in New Hampshire. "But we expected it. We survived it."

___

Online:

50th Anniversary: http://lgbt50.org/