ENTEBBE, Uganda — Scores of gay Ugandans and their supporters held a gay pride parade on a beach in this lakeside town on Saturday.

The parade was the first public event in support of gay rights since Aug. 1, when a Ugandan court invalidated an anti-gay law that had been condemned by human rights watchdog groups and some Western governments.

About 200 people were expected to attend the parade, a Ugandan gay-rights activist, Moses Kimbugwe, said before it began. Mr. Kimbugwe said that participants had to wait for police protection before marching through the sprawling botanical gardens in Entebbe, which is about 25 miles south of Uganda’s capital, Kampala, on their way to the beach.

Many of the marchers wore masks, a sign that they did not want to be publicly identified in a country where gay people have traditionally faced harsh discrimination. Some of those on hand waved rainbow-colored flags as they danced and frolicked on the sandy beach. A sticker on one participant’s face read: “Some Ugandans are gay. Get over it.”