Activists from several countries have strolled around Red Square and elsewhere in Moscow during the World Cup wearing their national teams' football jerseys to form a rainbow flag in an effort to champion gay rights.

The activists from Spain, Holland, Brazil, Mexico, Argentina and Colombia, whose soccer jerseys make the colours of the rainbow, said they had released images of their performance after they had left Russia to ensure their safety.

The group posed together on Red Square, Moscow's metro and outside Christ the Saviour Cathedral. ( Supplied: thehiddenflag.org )

Russia, which is hosting the football World Cup, prohibits what it describes as the promotion of homosexuality to minors, legislation that has been used to stop gay pride marches and detain gay rights activists.

Police did not immediately respond to a request to comment on the performance, but activists said they did not encounter hassle from police or attract their attention.

The group travelled to Russia's capital specially, posing together on Red Square, Moscow's metro and outside Christ the Saviour Cathedral.

Activists said they did not encounter hassle from police or attract their attention. ( Supplied: thehiddenflag.org )

Some of the photographs show them photographed near police officers.

Eloi Pierozan Junior, 32, an Amsterdam-based Brazilian who wore striker Neymar's shirt, said the aim of the action was "to spread a message of love and tolerance around the globe and not only in Russia".

The images were shot from June 28-30, and the performance was led by Spain's largest LGBTQI group, Federacion Estatal de Lesbianas, Gays, Transexuales y Bisexuales, he said.

"We were safe at home when we released the project," Eloi Pierozan Junior said.

The aim of the action was "to spread a message of love and tolerance around the globe and not only in Russia". ( Supplied: thehiddenflag.org )

Vitaly Milonov, the politician who co-authored the law against promotion of homosexuality to minors, said he was not bothered by the performance because it had not attracted much attention and that "no-one cares".

"People are coming here to watch the World Cup, not to show off their underpants," he said.

"But if these people want to walk around in shirts of their colour, then good, let them walk."

On the first day of the World Cup, police briefly detained a British gay rights campaigner near the Kremlin when he called attention to what he described as Russia's mistreatment of LGBTQI people.

Reuters