Lego portraits of famous and lesser-known activists from across the globe fill the floor of the Hirshhorn’s second-level gallery.

The Hirshhorn and Alcatraz — two fortress-like structures known for large expanses of windowless concrete — are about to have one more thing in common. A work by Chinese artist Ai Weiwei that debuted at San Francisco’s defunct island prison has come to the D.C. contemporary art museum in the exhibit “Ai Weiwei: Trace at Hirshhorn.”

The sprawling horizontal work “Trace” connects 176 portraits of people Ai considers to be activists, prisoners of conscience or advocates of free speech — and it’s all rendered on the floor in Lego bricks. The piece, which stretches around the Hirshorn’s second-floor gallery space in six large segments, required more than 1.2 million Legos to complete and was transported to D.C. mostly assembled, the museum says. It will remain on display for the rest of the year.

The people featured in the piece include familiar faces, such as Martin Luther King Jr. and Edward Snowden, but “Trace” is largely made up of lesser-known activists, several of whom are currently imprisoned for their beliefs. For example, one of the portraits is of Ilham Tohti, an economics professor in Beijing who frequently ran afoul of Chinese officials by reporting on the oppression of Chinese ethnic minorities — and was sentenced to life in prison in September 2014.

This wallpaper is called “The Animal That Looks Like a Llama but Is Really an Alpaca.”

Ai courted a similar fate just by creating “Trace.” In the months before the work’s debut at Alcatraz (also in September 2014), Ai was already under house arrest in Beijing for criticizing the Chinese government. That didn’t stop him from working quietly for months before the exhibit opened, when he sent blueprints for the portraits to San Francisco-based curators who then had volunteers assemble the Lego portraits at the prison. Surprisingly, the artist didn’t face official retaliation and has since been allowed to travel outside the country.

“He’s going to see ‘Trace’ in person for the first time, here at the Hirshhorn,” museum director Melissa Chiu says.

The Alcatraz exhibit — which included a station where visitors could write postcards to some of the prisoners featured in “Trace” — was more overtly political than the Hirshhorn’s presentation, which doesn’t include the postcard area, Chiu says.

“When it was shown at Alcatraz, ‘Trace’ had more of an emphasis on the idea of these individuals having been imprisoned,” she says. “Here, it’s making another kind of very important statement about the internet and surveillance and this moment in time where we are transitioning from the analog to the digital.”

Visitors to the Hirshhorn might notice how the portraits in “Trace” represent a mishmash of styles, colors and sizes, as if they were photos grabbed haphazardly from the internet. The use of Lego blocks references the centrality of the internet to modern life by creating a pixelated effect reminiscent of low-quality digital photos, Chiu notes.

Chinese artist Ai Weiwei is presenting his show "Ai Weiwei: Trace at Hirshhorn," which features Lego portraits of political dissidents and activists. (Erin Patrick O'Connor/The Washington Post)

Ai is also interested in internet censorship, social media and government surveillance — three themes emphasized by a wallpaper he created that encircles the Hirshhorn installation of “Trace,” Chiu says. Called “The Plain Version of the Animal That Looks Like a Llama but Is Really an Alpaca,” the wallpaper features repeating images of surveillance cameras, the Twitter bird logo and an alpaca icon that represents the fight against internet censorship in China.

“I think what he’s saying with the title [of the wallpaper] is that you may think you know what you’re seeing, but there’s a secondary meaning that you have to look closer to get,” Chiu says.

Behind Ai Weiwei’s alpaca obsession

The alpaca featured in Ai Weiwei’s wallpaper piece, “The Plain Version of the Animal That Looks Like a Llama but Is Really an Alpaca,” isn’t your average ungulate. The icon is a popular representation of a mythical beast called the “grass-mud horse” that appeared on a Chinese internet portal in 2009. When spoken aloud using a particular tonal inflection, the innocuous written characters for “grass-mud horse” sound like an insult that translates to English as “F— your mother.” What began as a clever way to get around internet censors, the Chinese characters for grass-mud horse — and the alpaca-like icon that’s come to represent them — have become a symbol for the fight for free speech in China.

Hirshhorn Museum and Sculpture Garden, Independence Avenue and Seventh Street SW; through Jan. 1, free.

More on Ai Weiwei

Ai Weiwei on creating political art in the Trump era: ‘Be part of the change’

‘Trace’ at the Hirshhorn is self-satisfied, but not satisfying