Reddit shut down its popular but controversial forum devoted to supporting President Donald Trump on Monday, following years in which the social media company tried but often failed to control the racism, misogyny, anti-Semitism, glorification of violence and conspiracy theories that flourished there.

The move against r/The_Donald, as the forum was known, came after its volunteer moderators and much of the community had left in recent months, moving to a website that mimics Reddit’s system of conversation and user voting on content but appears to have fewer rules. It is just one of several alternative social media sites, such as Gab and Parler, that have emerged in recent years, portraying themselves as freewheeling alternatives to more mainstream platforms.

The move by Reddit comes amid a broader crackdown by technology companies, including Twitter and Facebook, to try to rein in hateful, deceptive and other problematic content on their platforms, typically after high-profile scandals prompted action. Reddit also implemented its first policy banning hate speech on Monday and closed about 2,000 individual forums, what the company calls “subreddits.” The company already had a policy against “divisive language” in advertising.

Most of the closed subreddits already had become dormant while others, like r/The_Donald, had histories of policy violations. Reddit also closed the left-wing r/ElChapoTrapHouse on Monday for violating platform rules.

Chief executive Steve Huffman, who also is a co-founder of the site, said in announcing the move against r/The_Donald: “All communities on Reddit must abide by our content policy in good faith. We banned r/The_Donald because it has not done so, despite every opportunity.”

In a call with reporters, he added that the decision to close r/The_Donald and other politically themed subreddits was “absolutely not” related to the views aired on them. Numerous conservative forums remain active, and some liberal ones also were closed on Monday for policy violations, he said.

“It’s one of the founding principles of Reddit to foster [political] discussion,” Huffman said in the call with reporters.

The company’s general counsel, Benjamin Lee, said in the same call, “There’s a home on Reddit for supporters of Donald Trump. . . . We’re not the ones who shut down the community. The moderators are the ones who shut down that community.”

In addition to r/The_Donald, the most active communities banned included r/darkhumorandmemes, r/chapotraphouse, r/darkjokecentral, r/gendercritical.

Reddit’s r/The_Donald was born in June 2015 as Trump began what was widely seen then as a long-shot bid for the presidency. Over the years, it was subjected to escalating disciplinary actions for violating Reddit content policies. Last year, the platform imposed a “quarantine” that made the forum harder for Reddit users to access after what the company said at the time was months of “rule-breaking behavior.” Those violations included the “encouragement of violence toward police officers and public officials in Oregon” during a legislative dispute over climate legislation.

Earlier this month, cofounder and former Reddit CEO Alexis Ohanian quit the company’s board, saying that he would use his Reddit stock to serve the black community and curb racial hate. He said he would start by donating $1 million to an organization founded by former NFL player Colin Kaepernick. He asked that Reddit fill his seat with a black board member.

In announcing the decision, Ohanian, who is married to tennis superstar Serena Williams, appeared to reference Reddit’s hosting of hateful commentary. “I’m saying this as a father who needs to be able to answer his black daughter when she asks: ‘What did you do?’,” he said on Twitter.

By the time Reddit formally closed r/The_Donald on Monday, it officially had 790,000 self-described “Patriots” who participated in what has been billed as “a never-ending rally dedicated to the 45th President of the United States, Donald J. Trump,” but there was little sign of recent activity. The most popular posts were several months old.