Hundreds of thousands flocked to Madrid World Pride, the largest LGBTQ pride event in the world, for over a week of events, wrapping up on Sunday night.

Madrid World Pride coincided with the 40th anniversary of the first LGBT pride protest in Spain, taking place in Barcelona.

Saturday’s parade doubled as a protest march, led by all of Spain’s major political parties, carrying a banner reading, “For LGBTI Rights All Over The World.”

For lgtbi rights all over the world / Por los derechos LGTBI en todo el mundo #WorldPride2017 pic.twitter.com/ttzr2vTZO6 — MADO Madrid Orgullo (@MADOrgullo) July 1, 2017

Spain has been on the forefront of LGBTQ rights, granting marriage equality and adoption rights for same-sex couples in 2005.

Employment discrimination on the basis of sexual orientation has been illegal since 1995, although discrimination based on gender identity is still not banned nationwide. Hate crime laws exist for both categories, however, and have since 1995 as well.

World Pride has been held once every several years in a different city, starting in 2000 in Rome. The next World Pride is scheduled to take place in New York City in 2019, to coincide with the 50th anniversary of the Stonewall riots.

Related: Google grants $1 million to preserve Stonewall oral history

#worldPride2017 is absolutely amazing!!! Esto es asombroso!! Gracias Madrid!!! pic.twitter.com/7j57I1wIP2 — MADO Madrid Orgullo (@MADOrgullo) July 1, 2017

In addition to rallies and parades, there were also conferences, concerts, and events like a footrace with men wearing high heels.