Amid tight security, hundreds of thousands of people took part in a global gay rights demonstration in Madrid on Saturday.
"For all the people in countries who are suffering persecution, we have to celebrate and make visible our pride," Jesus Generelo, the head of the Spanish federation of LGBT people, told revelers.
The rally had been expected to draw between 1 million and 2 million people to march for gay, lesbian, bisexual and transgender rights, organizers and authorities said. Madrid city officials said later that "hundreds of thousands of people" were in the streets, dancing, cheering or watching the parade. Officials had released no official count by late Saturday.
The gathering, led by Spain's major political parties, was the highlight of a 10-day World Pride 2017 festival, which ends Sunday.
The parade included 52 floats, and festivities lasted several hours. Groups from several countries, including the United States and Britain, took part.
The event will be held in New York in 2019.
While police did not identify a specific terror threat regarding the pride parade, Europe is on edge after several high-profile attacks, such as recently in Britain and France.
"There is no specific terrorist threat but a generalized threat," German Castineira, operations chief for Madrid police, told the French news agency AFP earlier this week.
Thousands of security officials were on hand for the parade.
Forty years after members of the nation's gay community began marching for their rights, Spain has become one of the most progressive countries for gay rights. In 2005, it became the third country — after the Netherlands and Belgium — to legalize same-sex marriage.
Parades and events were held elsewhere around the globe Saturday.
In Singapore, thousands of people dressed in pink for the Pink Dot rally, which began in 2009. The government banned foreign participants from the rally.
In Northern Ireland, thousands marched in Belfast to demand the legalization of same-sex marriages, a day after Germany's parliament voted to do so.
However, a march for transgender rights that was scheduled for Sunday in Turkey has been canceled. The Istanbul governor's office cited public order and the safety of participants and tourists in canceling the eighth Trans Pride March.
Gay rights and the LGBT community are under assault in many countries.
ILGA, an international LGBT association, released its State-sponsored Homophobia report last month, which listed that 72 countries still consider intercourse between same-sex couples to be illegal. Same-sex couples also face the death penalty in Iran, Saudi Arabia, Sudan and Yemen, and in parts of Nigeria and Somalia.