PENSACOLA, Fla. (AP) _ If you commit a federal crime, particularly a drug offense, in northwest Florida, you can expect to do more time than anywhere else in the nation.

Last year, the average prison sentence in the northern U.S. District Court of Florida was 115 months, compared with a 61-month national average and 99 months in second-ranked northern Oklahoma and eastern Wisconsin, said a report from the U.S. Sentencing Commission.

''I think it has a lot to do with our area,'' Pensacola defense lawyer Barry Beroset said. ''A lot of our population is rural and conservative. In a large metropolitan area like Miami, cases may be seen in a different, less- serious light.''

The district covers only the northwestern portion of the state, including the entire Panhandle. The largest cities in the district are Pensacola, Fort Walton Beach, Panama City, Tallahassee and Gainesville.

Average sentence lengths in the two other districts in Florida also were above the national average in 1990: 95 months in the middle district and 81 months in the southern district.

Northern Florida also led the nation with the stiffest drug sentences, averaging 160 months, compared with 83 months nationally. Northern Oklahoma was a close second with 159 months. Elsewhere in Florida, the average was 114 months in the middle district and 110 months in the southern district.

Chief District Judge William Stafford of Tallahassee and District Judge Roger Vinson of Pensacola wouldn't comment on their sentencing patterns, but lawyers had several explanations for the long terms.

U.S. Attorney Ken Sukhia of Tallahassee said one reason is that his office focuses on major cases, many of them with numerous defendants and large amounts of drugs that justify longer sentences.

He also doesn't allow plea bargaining on sentence length, meaning a larger percentage of cases go to trial, and trials usually result in longer terms, said Assistant U.S. Attorney Randy Hensel.

A plea bargain means a judge must base sentencing on a written report from a probation officer rather than evidence presented at trial.

''There's no way a cold set of written facts makes the same impression as witnesses describing the crime in detail,'' Hensel said. ''In a jury trial, the judge has lived the crime through the witnesses. It makes an impression.''

Northwest Florida also has lower crime rates than more urban areas.

''Judges get jaded by numbers,'' said Assistant U.S. Attorney Steve Preisser. ''In Miami, I imagine one could get the perception drugs are out of hand, and it seems hopeless to do something about it. In the northern district, judges haven't lost the hope they can do something about it.''