Sen. John Cornyn, the No. 2 Republican in the Senate, sent a letter Friday questioning whether federal prosecutors were overzealous in their prosecution of Aaron Swartz, an Internet activist and co-founder of the website Reddit who took his own life last week.

“Was the prosecution of Mr. Swartz in any way retaliation for his exercise of his rights as a citizen under the Freedom of Information Act?” Mr. Cornyn said in a letter to Attorney General Eric H. Holder Jr. “If so, I recommend that you refer the matter immediately to the Inspector General.”

SEE RELATED:

Mr. Swartz committed suicide last week at the age of 26. He was facing trial on charges of breaking into the Massachusetts Institute of Technology’s computer system and downloading academic articles without a subscription. He could have faced up to 35 years in prison and a $1 million fine.

His family and friends have blamed the government for his death, saying they bullied him with their prosecution.

The federal prosecutor, Carmen M. Ortiz, who is the U.S. attorney for Massachusetts, defended the prosecution, saying it was reasonable. She also said the government had never vowed to seek the maximum penalties possible.

But Mr. Cornyn appeared to bristle at her claim that it was the punishments laid out by Congress that prompted the long list of charges. The Texas Republican demanded Mr. Holder answer whether prosecutors have discretion when charging people with crimes.