For a quarter of a century, Caroline County Sheriff Louis C. Andrew kept watch over the county jail here without worrying about overcrowding.

In recent years, however, as the county's crime rate has risen and judges have begun handing out stiffer sentences, the jail has gotten a lot more business, Andrew said. And while he likes to keep the jail full, he'd rather not have so many local criminals.

The Caroline County facility, a three-story, red brick building on the bank of the Choptank River, has turned into a money-maker for the county because it rents space for placements of state and federal prisoners. It is one of three county jails in the state that takes in outsiders, and has been able to do so since 1982, when it was expanded from 20 beds to 70.

"We figure that if you're going to have a jail, you might as well keep it full," said the sheriff, who administers out of his blue and gold office here in the county seat.

But the increase in local crime has meant that Andrew's jail now has fewer cells for those out-of-towners, whose placement fees amounted to $168,116 last year and paid for a third of the jail's operating costs. In quieter times, he was able to reserve 20 beds for rentals.

"Name another jail that made $168,000 last year," said the sheriff's son and administrative deputy, Charles. "It would be hard to do."

"We'd have more federal prisoners now," the sheriff said, "if our own population wasn't so high."

He anticipates that revenues from cell rentals will continue to fall in coming years because Caroline County judges are passing stricter sentences in local cases. "It's getting to the point now that if you go before a judge, you go to jail," Charles Andrew said.

While it costs Caroline County $26.51 a day to house its own inmates, the federal government pays $35 a day. Maryland pays the county rate for state prisoners. The jail takes in inmates from elsewhere in Maryland as well as federal prisoners from Richmond, Baltimore, Delaware and the District. Jails in Allegany and Carroll counties are the only other county facilities in the state that accommodate federal prisoners, according to the Justice Department.

Last week, 60 of 67 inmates at the Caroline County jail were locals. Andrew said he couldn't rent out the remaining three beds because he needed them for persons serving weekend sentences.

The 57-year-old sheriff maintains that the increase in criminal activity in the county of 24,000 is largely the result of "strangers" who have settled in the county since completion of the second span of the Chesapeake Bay Bridge in 1973. The county's population in 1970 was less than 20,000.

Stiffer drunk driving laws account for some of the increase, he said, while more sentences have been passed out for breaking and entering and writing bad checks.

When it comes to crime in Caroline, the Andrew family has a corner on institutional memory, for sheriffs named Andrew have been keeping an eye on the county since Prohibition.

Louis Andrew took over the office from his father, William E. Andrew, who served from 1938 until his death in 1961 and who followed his father, William C. Andrew, who was sheriff in the 1920s and '30s.

And the current sheriff's 28-year-old son, Charles, says he stands ready to continue the tradition. His father is seeking reelection to a seventh term this year.

"We do have a special situation with our jail," Richards, the county administrator, said. "It's been a family business in Caroline County."

The male Andrews haven't done it alone, for as long as the name Andrew has been synonymous with law enforcement in the county, the name "Mrs. Andrew" has been synonymous with jailhouse food. It's been a requirement of the job that the sheriff's wife prepare meals for the jail's inmates, a duty that went unpaid until the 1970s.

"I'll vote for Gov. Harry Hughes until the day I die," said Andrew's wife, Joyce, as she slapped a slice of boiled ham between two slices of white bread in the jail's kitchen. "It was him who said 'Pay her $100 a week.' "

Denton is Hughes' home town, and the state law covering the Caroline County sheriff's operation was changed through his efforts when he was a state senator. In the 1960s, Hughes lived and practiced law two doors away from the jail.

"Back then," said Charles Andrew, "it was like Andy Griffith in Mayberry around here."

The Andrews no longer make their home in the jail building. They've moved across the street, about 100 feet away.

There Joyce Andrews still makes biscuits and homemade gravy, and meals of roast beef with mashed potatoes and green beans are the rule, not the exception, she said.

Of course, jail wouldn't be jail without complaints from inmates. But they don't tend to come from the out-of-staters who were interviewed recently.

Anne Arundel County resident John Dreistadt, 21, who was serving a 90-day sentence in Caroline County for violation of probation, said the Caroline facility is cleaner than the Anne Arundel jail, but he noted that it lacks a law library, and hot meals come only twice a day.

Sheriff Andrew said that the hot meals are usually breakfast and either lunch or dinner. The third meal consists of sandwiches, he said.

"We don't have trouble with the federal prisoners," Charles Andrew said. "They are tickled to death to be here. They're polite, well-mannered.

"It's the Caroline County inmates who give us trouble. They don't know what they've got. Just let them step across the bridge one time. . . . They'll find out."

One federal prisoner, a 34-year-old man sentenced by a federal judge in Baltimore for cocaine distribution, said he expected to serve his six months in "one of those country clubs" -- a minimum security prison where the programs and physical design are considerably less grim than conventional prisons.

"But they told me they were all full," the first-time offender said. "This is the next best thing. I've got a room with a view of the river."

Added 22-year-old Kendall Simms, a prisoner from Caroline County: "It's the best jail on the Eastern Shore. I know. I've been through all of 'em."