After Jeffrey Epstein was indicted for sex crimes in 2006, his Harvard lawyer, Alan Dershowitz, called on the expertise of one of his Harvard colleagues, famous linguist Steven Pinker.

An obscure document from Epstein’s legal defense shows that Pinker weighed in on the precise meaning of a federal law about using the internet to entice minors into prostitution or other illegal sex acts.

Pinker told BuzzFeed News that when he offered his opinion to Dershowitz, he was unaware of the details of the client or the case. He now regrets his involvement, he said.

“Though I did this as a favor to a friend and colleague, and not as either a paid expert witness or as a part of a defense team, knowing what I know now I do regret writing the letter,” Pinker said by email.

Epstein, who had donated millions of dollars to Harvard, seemed to relish his connections to the university. He once served on Harvard’s Mind, Brain, and Behavior Advisory Committee, and press releases issued by his charitable foundation billed him as a “Harvard philanthropist” and a “Harvard investor.”

When Epstein was indicted in 2006, Dershowitz, a personal friend, joined his defense team. As Dershowitz researched the charges, he asked Pinker for advice on the wording of a federal law sometimes known as the “internet luring statute.”

The law says that anyone “using the mail or any facility or means of interstate or foreign commerce” to entice a minor into prostitution is subject to a fine and at least 10 years in prison.

In a July 2007 letter to US attorneys prosecuting the case, Dershowitz and another of Epstein’s lawyers, Gerald Lefcourt, argued that law didn’t apply to Epstein because prosecutors had not specifically shown that Epstein had used online communication to entice the unidentified victims of his alleged crimes.

“To confirm our view of the ‘plain meaning’ of the words, we asked Steven Pinker … a noted linguist, to analyze the statute to determine the natural and linguistically logical reading or readings of the section,” the pair wrote. “Specifically, we asked whether the statute contemplates necessarily that the means of communication must be the vehicle through which the persuading or enticing directly occurs. According to Dr. Pinker, that is the sole rational reading.”