Ten days before Jonathan Eric Pendleton was arrested in an attack on Tyler Cowen during a George Mason University Law School lecture, a comment was posted under Pendleton’s name on the well-known economist’s blog.

“What better place to do prison research than inside a prison?” a Jonathan E Pendleton wrote. “If the police and FBI won’t arrest you for hacking my computer and sexually harassing me over the past several months, I will do it myself — in the next couple weeks before school starts again. Either way, one of us is going to prison.”

The poster said he was in Seattle. Five days later, someone writing under the name Jonathan Pendleton posted that he was in Alexandria, writing, “Hey, look: it’s like the x-ray version of Modern Principles” — a reference to the textbook Cowen wrote.

Pendleton, a wiry 31-year-old with a beard and deep-set eyes who is being held in Arlington County, is charged with abduction and malicious injury with a caustic substance.

On Tuesday, Arlington General District Court Judge Thomas J. Kelley Jr. ruled that Pendleton’s case will go to a grand jury. The judge also issued a protective order barring Pendleton from any contact with Cowen for two years.

George Mason economics professor Tyler Cowen. (Evy Mages/For The Washington Post)

Cowen, 52, testified that Pendleton “burst into the room” during his March 26 class bearing handcuffs, pepper spray and a Taser-like device and announced that he was making a citizen’s arrest of the professor.

“He tried to handcuff me,” Cowen said of the man, whom he said he had never seen before. “I did not submit.” Cowen said he scurried out of the room in fear for his life and was chased down hallways into a women’s bathroom, where he tried to barricade the door. “I felt in great danger and as if I was being abducted,” he said.

Pendleton forced his way inside, Cowen testified, and a scuffle ensued. As Pendleton tried to handcuff him, he said, the defendant sprayed him in the eyes with pepper spray. The professor said that his glasses helped shield him but that the spray stung painfully nonetheless and that the struggle left him with wounds on his face.

Cowen pushed his way out of the bathroom and toward a more crowded area where a “commanding” bystander stepped forward and barred Pendleton’s way until police arrived and arrested him.

“I was accused of having controlled his mind at a distance and also [of] sexual harassment,” Cowen said, explaining that the mind control allegedly occurred “by computer technology at a distance.” Cowen added that he has “never hacked into anyone’s computer.”

Pendleton’s attorney, Jason S. Rucker, tried to ask Cowen during his testimony about the blog comments under Pendleton’s name, a line of inquiry that the judge ruled irrelevant to the case. Rucker said that his client believed he was falsely arrested while in the process of making a legitimate citizen’s arrest. He also argued that because Cowen did not go to a hospital after the incident, the attack did not rise to the level of the caustic-substance charge.

“I just wanted to be by myself and go away,” Cowen testifed when asked why he did not seek further treatment. In addition to writing a popular economics blog, Marginal Revolution, Cowen maintains an extensive Web site devoted to ethnic food in the Washington area.

Cowen declined to comment after the hearing, citing the ongoing legal case. Other than a brief note on Twitter saying “Back to work! (as usual). . .” after the attack, he has not spoken publicly about his ordeal.