Capitalising on the popularity of Britain's two-wheel Olympic triumphs, an annual festival of cycling is to be held in London – including a mass road race to rival the marathon.

RideLondon will be held over a weekend next summer with roads from the city centre to Surrey set aside to emulate the events that saw Bradley Wiggins and others ride to medal success.

More than 20,000 people are expected to participate in the 100km ride, while everyone from the top professionals to families with children will ride their bikes through London in other parts of the event.

Announcing the news alongside Team GB's double gold medal-winning cyclist Laura Trott, the London mayor, Boris Johnson, said it was "the moment for the great leap forward in cycling".

Hugh Brasher, race director for the London marathon and part of the team organising RideLondon, said he believed it would become as big a fixture as the running equivalent, and could continue to inspire cycling after the Olympics. He said he hoped it would "encourage people to get fit, cycle and start commuting into London by bike".

Trott said: "To have an event that is in the city is amazing. It's a nice way for the family to come and cycle on closed roads, and easier to start than joining a club."

The weekend will start with a Freecycle ride open to all across eight miles of central London roads, closed to traffic, which organisers hope will attract cyclists of all abilities and ages. The RideLondon 100 will be the marathon equivalent for amateur riders, who can register their interest online now at ridelondon.co.uk. Other races for youths, women and disabled cyclists will follow, as well as the Classic one-day race where international men's elite cyclists will race the Olympic road race course into Surrey.

The mayor said he could not claim that cycling was coming home as the bicycle was invented by "some German count", but claimed that an earlier Johnson from London, named Dennis, had developed the spokes.

The mayor urged more commuters to travel by bicycle, adding that he had cycled to the launch event in his suit and was still "perfectly fragrant".

Trott said she felt safe cycling in London, but added that more cycle lanes should be created. Cycling groups point out that casualties on London roads among cyclists have risen during Johnson's tenure as mayor.

Caroline Pidgeon, chair of the transport committee in the London assembly, welcomed the festival but said the "rehashed proposals expose the mayor's lack of vision".

"At the centre of any cycling legacy must be bold measures to make cycling in London far safer and attractive for 365 days a year."

Johnson said that substantial sums were being spent to make the streets safer for cyclists but said he did not want to "bully" motorists by changing roads, and that there had to be compromises made.