SINGAPORE (Reuters) - Singapore’s annual Pink Dot gay pride rally drew thousands of people on Saturday, despite new restrictions aimed at keeping foreigners out of domestic politics and barricades put up around the rally site.

Slideshow ( 7 images )

The rally has been held since 2009 under stringent public assembly laws at Speakers’ Corner, an area set aside for demonstrations, performances and exhibitions.

But this year, Speakers’ Corner was barricaded and participants had to show ID to prove they were citizens or permanent residents before they could enter, with a set maximum taking part.

Under Singapore law, sex between men is punishable by up to two years in jail, though prosecutions are rare. Prime Minister Lee Hsien Loong told the BBC earlier this year than he was “prepared to live with (the law) until social attitudes change”.

Foreigners have never been legally allowed to join rallies in the city-state, but many have got around the restriction by “observing” such events.

Changes to the law announced in October remove the distinction between “participants” and “observers”, the Pink Dot organizers said.

They would not disclose the turnout or what the maximum capacity was on Saturday, but participants said the number was below the 28,000 who took part last year.

“The crowd is less dense this year, but I think we’re getting new people,” said participant Atiq Lukman. “Every year, I hear of people making this their first Pink Dot.”

The level of security also tripled this year, organizers said, with metal detectors and barricades under a law that requires police to monitor events with a crowd of more than 5,000 people.

The government said the move was in response to a growing threat of terrorism.

This year, Taiwan became the first territory in Asia to legalize same sex marriage. In the same week in Indonesia, two men were publicly caned for engaging in gay sex and police have set up a special force to investigate LGBT activity.