Walmart removed a controversial T-shirt urging violence against journalists from its website after a news association asked for it to be pulled amid “today’s vitriolic political and ideological environment,” according to a report.

The Radio Television Digital News Association announced Thursday that the nation’s largest retailer on Wednesday removed the T-shirt — which reads: “Rope. Tree. Journalist. SOME ASSEMBLY REQUIRED” — from its online store.

In a Nov. 29 letter to top Walmart executives, the Washington-based organization “respectfully” requested that Walmart remove the shirt from its website.

“Although the shirts are available from at least one other e-commerce source, Walmart appears to be the only major retailer selling them in the US,” RTDNA executive director Dan Shelley wrote.

T-shirts or any other items bearing such a sentiment “simply inflame” the passions of people who either don’t like or don’t understand the media, Shelley’s letter continued.

“At worst, they openly encourage violence targeting journalists,” Shelley wrote. “We believe they are particularly inflammatory within the context of today’s vitriolic political and ideological environment.”

Shelley said he received an email from the company within five hours of sending his letter, indicating that the complaint was forwarded to the appropriate team for removal.

“We are grateful for Walmart’s swift action, but dismayed that it, and anyone else selling the shirt, would offer such an offensive and inflammatory product,” Shelley said. “We live in an environment in which political and ideological discourse has deteriorated to the level where some find it appropriate to advocate violence targeting journalists merely for performing their constitutionally guaranteed duty to seek and report the truth.”

Shelley’s letter also noted that, according to the US Press Freedom Tracker, nearly three dozen journalists have been assaulted in 2017. Shelley’s letter also cited statistics from the Committee to Protect Journalists showing that at least 48 journalists have been killed in other countries worldwide so far this year.

The shirt had been offered on Walmart.com via a third-party seller, Teespring.com, according to RTDNA. The shirts made headlines last year after being spotted at political rallies prior to the presidential election. Former Major League Baseball pitcher Curt Schilling also endorsed the T-shirts, calling them “awesome” in a Twitter post last November that he later deleted.

In a statement to The Post, Walmart officials said they were conducting a “thorough review of the seller’s assortment.”