Campaigners celebrated WorldPride in London on Saturday on the 40th anniversary of the first gay pride march in the capital.

Despite a funding shortage which resulted in a scaled-down version of the event without floats or vehicles, organisers remained upbeat.

Peter Tatchell, the leading human rights activist who has been involved in the organisation of all pride marches spanning four decades, said Saturday's event was more political than in recent years. "The global human rights message is really strong for lesbian, gay, bisexual and transgender freedom. Nearly 80 countries still criminalise homosexuality with the penalties ranging from life imprisonment and even execution.

"We are also celebrating 40 years of gay pride in Britain. In those last four decades we have won the repeal of nearly every anti-gay law. All that remains is to win same-sex marriage."

The prime minister, David Cameron, said: "The UK has been judged to be the best country in Europe in which to live if you're gay so it is great that World Pride is being celebrated here in London – especially during this diamond jubilee and Olympic year.

"I'm very pleased that the mayor of London has enabled the march and events in Trafalgar Square to go ahead and I want to thank all the volunteers who will be stewarding the event and contributing to it.

"It is 40 years since people first marched in London calling for equal rights. Since then we've come a very long way and progress is still being made. We have just finished consulting on how to introduce same-sex marriage and we are working with countries across the globe to bring about greater equality.

"I hope you all have a happy pride and remember all those who have, and those who are still fighting for, greater rights and protection for the LGBT community."

An event spokesman said that all the agencies involved had agreed that it was prudent to deliver an event that was affordable, without compromising safety, security and integrity.

A statement on the Pride London website said: "London and UK's LGBT community has never been one to flounder in the face of adversity. Despite the changes in the past week, we urge all members of the community to come out in force and support WorldPride and do the very best they can.

"Forty years on from the very first Pride London march, we need to show that this fighting spirit from 1972 lives on. Not just for us, but for our brothers and sisters across the world who are still fighting for their rights to be human, their rights to love and the decriminalisation of homosexuality in the place that they live."