Hundreds of thousands crammed the Spanish capital's broad central avenues to the din of drums and whistles as rainbow-coloured flags fluttered in the sunshine.
Dressed as everything from policemen to ancient warriors with swords and helmets, drag queens, transsexuals and other party-goers danced in the street and waved from double-decker buses that crawled slowly through the crowd.
"I'm having a great time. This is an opportunity for me to offer myself to the world of showbiz," said Julia Woman, a lanky man of 30 in a blond wig and leopard-print dress, whose high heels made him nearly six and half feet (two metres) tall.
"It's also a chance to defend my rights on the subject of homophobia and all that. And also to have a bit of fun, a bit of personal satisfaction."
Organizers expected more than a million people, including thousands from abroad, at the evening parade, the main event in five days of festivities by defenders of lesbian, gay, bisexual and transgender (LGBT) rights.
"I came because I was told it is the biggest Gay Pride parade, and that's true," said Christophe Probst, 47, a Frenchman who came from Paris for the party.
"It's fantastic. The whole city gets involved. There is nothing else like it."
The festival kicked off night with an open air appearance by Conchita Wurst, the bearded Austrian transvestite who won the Eurovision song contest in May.
That was followed by an annual highlight of the festival: men in high heels and dresses raced on foot through Madrid's gay district, Chueca, cheered on by crowds.
Wurst sang evening alongside various Spanish stars at a concert in the Vicente Calderon stadium, home to Atletico Madrid football club.
Organizers call it the biggest pride party in Europe. The two LGBT groupings behind Madrid Pride, COGAM and FELGTB, said they expected 1.2 million people to join in.
Madrid police said nearly 500 officers would be in the streets for security.
Pride events in other European capitals have reported hundreds of thousands of participants.
The groups that organised the march dedicated it this year to victims of discrimination in countries where gays, lesbians, bisexuals and transsexuals are punished, sometimes by death.
"We are organising one of the best Pride events in the world," said Boti G. Rodrigo, leader of FELGTB, in a statement.
"It is time to speak up for all those who cannot, so they can see that they are not alone in suffering, that we are fighting for their freedoms and for our own and that LGBT human rights are inalienable," she added.
The organisers warned in their manifesto for this year's event against the threat of discrimination posed by far-right groups which have gained strength in some European countries.
They added that spending cuts imposed in Spain by the conservative Popular Party during the recent economic crisis had increased discrimination in access to public services such as healthcare.
Spain emerged in the late 1970s from several decades of social conservatism under the dictator Francisco Franco, into an era of liberal reforms.
In 2005 it became the third country in the European Union to legalise gay marriage, after the Netherlands and Belgium. Several other countries around the world have followed.