Raeanna Woody, shown at her home in Cheyenne, Wyo., was granted clemency under President Barack Obama. (Nick Cote/For The Washington Post)

Raeanna Woody’s crimes hardly seemed like they would add up to a life sentence in prison. She had two nonviolent drug convictions, for possessing marijuana and delivering 12 grams of methamphetamine. But when she was arrested in a third drug case, she said, the office of U.S. Attorney Matthew G. Whitaker decided to make an example of her.

Under Whitaker, who is now acting attorney general, Woody was given a choice: spend the rest of her life in jail, or accept a plea bargain sentence of 21 to 27 years, according to court records. She took the deal.

Judge Robert W. Pratt in the Southern District of Iowa later accused federal prosecutors of having “misused” their authority in Woody’s nonviolent case. He urged President Barack Obama to commute her sentence — and Obama did shorten her term, after she had served 11 years.

Woody’s case highlights one of the most controversial if little-known aspects of Whitaker’s ­career: his efforts to obtain unusually stiff sentences for people accused of drug crimes.

Whitaker spent nearly five years as U.S. attorney for the Southern District of Iowa. His office was more likely than all but one other district in the United States to use its authority to impose the harshest sentences on drug offenders, according to a finding by a different Iowa federal judge, Mark W. Bennett, who called it a “deeply troubling disparity.”

“If the president can look at my case and he can see that what I had done wasn’t severe enough to warrant that many years, then why was I given that many years to begin with, why was that much of my life taken from me?” Woody, a 57-year-old mother of five, said in an interview. “I blame Whitaker’s office and ­everybody underneath him.”

The Justice Department declined to comment for this article.

Whitaker’s record on drug sentencing is newly relevant after President Trump ousted Jeff Sessions as attorney general this month and replaced him on a temporary basis with Whitaker, who was Sessions’s chief of staff.

Trump last week announced his support for legislation that would give judges more discretion in sentencing nonviolent drug offenders and reducing prison terms. Sessions had opposed the bill. Now Whitaker, as acting head of the Justice Department, is in a powerful position to try to influence the outcome.

Whitaker has come under intense scrutiny since Trump appointed him on Nov. 7. His un­­or­tho­dox selection, with no Senate confirmation, has drawn attention because of concerns that he could interfere with or shut down special counsel Robert S. Mueller III’s investigation into Russian interference in the 2016 presidential election.

Whitaker has also drawn scrutiny for saying that judges should have a “biblical view” of the law and that courts should be an “inferior branch” of government. In addition, he worked as a board member for an invention-marketing company that shut down in May and agreed to pay nearly $26 million to resolve a complaint from the Federal Trade Commission, which accused it of bilking customers.

Supporters cite Whitaker’s five years as a U.S. attorney as his most relevant experience to be acting attorney general. He was working as a private attorney when he was recommended for the job by Sen. Charles E. Grassley (R-Iowa). President George W. Bush nominated Whitaker, and he was sworn into office on June 15, 2004.

A year later, Whitaker said that his office had tried 500 cases, of which 271 were drug cases, most of them involving methamphetamine. At the time, Iowa, like many states, was trying to quell the growing use of meth.

The Bush administration had encouraged tough sentences on repeat offenders, and Whitaker used a powerful tool that gave him discretion to impose longer jail times than other parts of the country.

In 1970, Congress passed legislation that gave U.S. attorneys the ability to dramatically lengthen prison terms. It was called an “851 enhancement” filing, under which a second-time offender’s sentence could be “enhanced” so that a 10-year sentence automatically was extended to 20 years. A third-time offender could receive a life term.

A judge had no choice other than to impose the longer sentence. A prior offense could be as little as an aggravated misdemeanor in a state court that led to no jail time. Critics have long said it has been misused in some jurisdictions by overzealous federal prosecutors.

Questions about the use of these filings came to the attention of Bennett, a U.S. District Court judge in the Northern District of Iowa. He suspected that defendants in his court were more likely to face increased sentences than those in neighboring Nebraska, and he took it upon himself to conduct a ­nationwide analysis.

He found a wide disparity and inserted the results of his study into his ruling in a case that had come before him. He found that Whitaker’s office used its power to make such filings more than any other U.S. attorney except one in a Florida district. (A U.S. attorney in Guam, a U.S. territory, had a higher rate but a statistically insignificant number of cases.) The judge based his finding on cases during fiscal 2006, 2008 and 2009. Whitaker’s term began in mid-2004 and ended in January 2009. While the report covered only part of Whitaker’s service, it was a broad enough sample for Bennett to consider it representative.

The rate at which Whitaker’s office and another one in Iowa sought the harshest possible sentence was a “jaw-dropping and deeply troubling disparity compared to the vast majority of federal courts in the nation,” Bennett said in a statement to The Washington Post. Whitaker never appeared before him, and he declined to comment about Whitaker’s term as U.S. attorney.

Whitaker’s Southern District of Iowa used enhanced sentences in 84 percent of relevant cases, compared with 26 percent nationwide, Bennett’s finding said. Bennett concluded that a defendant in the Northern District of Iowa — which had a rate of filings similar to Whitaker’s district — was 2,532 percent more likely to be subjected to an enhanced sentence compared with someone convicted of a similar offense in a Nebraska district.

“I found their harshness in filing 851 notices inexplicable,” Bennett said.

In Raeanna Woody’s case, the filing was used as leverage by Whitaker’s office. Woody, whose last name at the time was Paxton, appeared before Judge Pratt in the Southern District on July 10, 2008.

Her previous drug convictions resulted in little or no jail time. Her third offense occurred when authorities determined that she drove a car in which another individual was pursuing a drug deal.

Woody said a prosecutor from Whitaker’s office, Jason T. Griess, had informed her that, as a third-time offender, her sentence could be “enhanced” to mandatory life in prison under an 851 filing. She said she had no choice but to make a plea bargain that resulted in the sentence of 21 to 27 years.

“I remember them saying through Jason that he wouldn’t budge, and ‘me and my office are going to make an example out of you.’ ”

Griess declined to comment for this article.

When the sentencing came before Pratt, he made clear that he was appalled that Whitaker’s office had used the threat of a life sentence to get Woody to agree to the plea bargain.

“I think that’s entirely too long a sentence,” Pratt told Woody, according to the sentencing transcript, but he said the agreement left him no choice.

The matter eventually came to the attention of JaneAnne Murray, who runs the University of Minnesota Law School’s Clemency Project. Murray, who took on the case, said Woody’s “sentence was excessive by any measure.”

Murray wrote a report to Pratt urging clemency. Pratt then wrote a letter to Obama’s pardon attorney expressing his displeasure with how the case had been handled by Whitaker’s office. Pratt wrote in the May 13, 2016, letter that he was forced to impose a sentence that “was entirely disproportionate” to her crime.

The “most compelling reason” that the president should grant clemency, Pratt wrote, was that Whitaker’s office “misused” its power by threatening Woody with a life sentence by using the 851 filing, “effectively removing my discretion” to give Woody “a fair sentence.” Pratt stressed that Woody “was and is a nonviolent offender. She was not a significant player in the overall ‘conspiracy’ in this case. . . . This was not a conspiracy that involved ‘drug kingpins.’ It was a situation where methamphetamine-addicted individuals resorted to selling the drug to support their own addictions.”

Pratt declined to comment for this article.

While Woody was serving her 11th year in federal prison, she got a phone call telling her that Obama had granted her clemency. She eventually was freed, got remarried and moved to Cheyenne, Wyo., where she works at a factory assembling medical devices.

Whitaker was replaced as U.S. attorney by Nicholas A. Klinefeldt, who became interested in the job partly because of his outrage over the sentencing of his father. Michael Klinefeldt was given a 10-year term in a methamphetamine case brought by Whitaker’s predecessor. Nicholas Klinefeldt said that by 2013 he had stopped using 851 enhancement filings to lengthen sentences.

“This is an issue I completely disagreed with Matt Whitaker on,” Klinefeldt said. “Frankly, we are never going to prosecute our way out of our drug problem. Lengthy sentences for drug criminals is not the answer.”

Whitaker, who lost a 2014 campaign for the Senate, subsequently seemed to have made a turnabout on sentencing. On July 20, 2016, two months after Pratt wrote his letter urging Woody’s clemency, he attended a news conference in support of legislation to reduce sentences of non­violent drug offenders. Standing by the bill’s co-sponsor, Grassley, Whitaker declared that it would “free up” space in federal prisons and enable the government to “focus on violent criminals.”

A month later, Obama commuted Woody’s sentence.

Carol D. Leonnig and Alice Crites contributed to this report.