Chinese artist Ai Weiwei poses with one of his pieces at his exhibition at the Royal Academy of Arts in London.AP

LONDON — Ai Weiwei is taking on Lego, brick by brick.

Art galleries around the world are collecting plastic pieces for the dissident Chinese artist after the Danish toy company refused to supply its product for his latest project.

Ai, whose work is often critical of Chinese authorities, says Lego last month refused a bulk purchase order from an Australian gallery where he plans to build a new artwork on the theme of freedom of speech.

Lego bricks are poured through the sunroof of a BMW 5 series car, used as a receptacle for donations of Lego bricks in the courtyard of the Royal Academy in London on Oct. 30.Getty Images

Ai called the move “an act of censorship and discrimination,” but Lego says it can’t endorse the use of its bricks in projects with a “political agenda.”

London’s Royal Academy, which is currently mounting an exhibition of Ai’s work, is encouraging supporters to fill a BMW in its courtyard with Lego bricks that will be shipped to Ai.

Other galleries have also taken up collections, including the Brooklyn Museum in New York, Berlin’s Martin-Gropius-Bau and Australia’s National Gallery of Victoria, where an exhibition of Ai’s new work is due to open in December.

Lego reported sales of $2.1 billion in the first half of 2015, which makes the privately owned company the world’s biggest toy-maker, surpassing Barbie manufacturer Mattel Inc. China is one of Lego’s biggest growth markets, but the company said Ai’s case was the product of longstanding policy, not politics.

Lego said it had a decades-old policy of not “actively engaging in or endorsing the use of Lego bricks in projects or contexts of a political agenda.”

“This means that in cases where we receive requests for donations or support for projects from artists, we kindly decline in the cases where we are made aware there is a political context,” the company said in a statement.

A woman throws Lego bricks into a BMW 5 series car, used as a receptacle for donations of Lego bricks in the courtyard of the Royal Academy in central London.Getty Images

Lego said that rule applied to requests for donations — which it generally refuses unless the recipients are children — or bulk purchases. But it said “anyone can purchase Lego bricks in toy stores or in other ways and use them for any purpose they desire.”

Lego is eager to avoid artistic controversies like the 1996 incident in which provocative Polish artist Zbigniew Libera created a concentration camp toy set with Lego blocks. Since then, his death-camp toys have been shown in museums and galleries around the world.

Lego said then that it had given some of its building blocks to Libera when he asked for a donation, but would have refused had it known what he planned to make with them.