Richard Stallman, a prominent computer scientist, resigned Monday from the Massachusetts Institute of Technology and the Free Software Foundation after he posed questions on a group email related to convicted sex offender Jeffrey Epstein.

Stallman was a visiting scientist at MIT’s Computer Science and Artificial Intelligence Lab, known as CSAIL, and founder and president of the Free Software Foundation, a nonprofit that advocates for computer-user freedom. He resigned from both organizations after sending an email to members of the computer lab that struck some colleagues as an offensive attempt to downplay child sex trafficking and to diminish the role a prominent MIT scientist might have played in the Epstein scandal. In the group email, Stallman suggested one of Epstein’s victims may have presented herself as “entirely willing.”

Stallman, an outspoken advocate for online freedom, has provoked controversy in the past for his opinions. He has written previously that he did not think there was anything wrong with sex between an adult and a child. In September, he wrote that in recent years, he had learned that sex could cause psychological damage to a child.

But debate flared following revelations at MIT that senior officials knew of gifts from Epstein, who pleaded guilty in 2008 to two felony offenses, including procuring a person under 18 for prostitution. He was arrested in July on new federal charges of sexually abusing dozens of girls in the early 2000s. In August, he was found dead while in federal custody.

At MIT, a colleague sent to the computer lab’s group email an invitation to a protest. Stallman responded with a complaint that the announcement did an injustice to his former MIT colleague, the late Marvin Minsky, a pioneer of artificial intelligence. The protest announcement said Minsky was “accused of assaulting one of Epstein’s victims.”

Stallman wrote, “The injustice is in the word ‘assaulting’. The term ‘sexual assault’ is so vague and slippery that it facilitates accusation inflation: taking claims that someone did X and leading people to think of it as Y, which is much worse than X.” Stallman wrote that if Minsky and the girl did have sex, the word “assaulting” presumes force or violence was used to coerce it.

“We can imagine many scenarios, but the most plausible scenario is that she presented herself to him as entirely willing,” Stallman wrote. “Assuming she was being coerced by Epstein, he would have had every reason to tell her to conceal that from most of his associates.” He wrote that it was best to use precise language to ensure an accusation would not be inflated.

When a colleague responded that the woman was 17 at the time and that made the encounter rape in the Virgin Islands, Stallman wrote, “Does it really? I think it is morally absurd to define ‘rape’ in a way that depends on minor details such as which country it was in or whether the victim was 18 years old or 17.”

He wrote that they know the girl “was being coerced into sex — by Epstein. She was being harmed. But the details do affect whether, and to what extent, Minsky was responsible for that.”

The exchange prompted a post on Medium by an MIT graduate, Selam Gano, calling on Stallman to be removed from the university. It also resulted in a story in Vice and calls from leaders of two nonprofits for him to resign.

On Saturday, Stallman wrote, “I want to respond to the misleading media coverage of messages I posted about Marvin Minsky’s association with Jeffrey Epstein. The coverage totally mischaracterized my statements.

“Headlines say that I defended Epstein. Nothing could be further from the truth. I’ve called him a ‘serial rapist’, and said he deserved to be imprisoned. But many people now believe I defended him — and other inaccurate claims — and feel a real hurt because of what they believe I said.

“I’m sorry for that hurt,” he wrote. “I wish I could have prevented the misunderstanding.”

Stallman did not immediately respond to messages seeking comment. In a blog post Monday night, he wrote to the MIT community that he was resigning effective immediately. “I am doing this due to pressure on MIT and me over a series of misunderstandings and mischaracterizations,” he wrote.

Daniela Rus, the director of CSAIL, sent an email to the lab announcing the resignation, thanking Stallman for “his technical contributions to the lab, to the free-software movement, and to the wider computer-science community over the decades.” She wrote that leaders at the lab plan to discuss “how we can improve the ways we respectfully work with one another in this community.”

Students go to this reporter with their sexual assault stories. Now their university might force her to reveal their names.

She works for the university-owned NPR station. The school says that makes her a ‘responsible employee’ under Title IX.

We’re Asian American and go to Harvard. Here’s how our relationship to race changed after coming to campus.

Four Harvard students write about affinity groups, K-pop and an ‘Asian awakening’