Mayor Marion Barry and the Department of Corrections temporarily relieved the overcrowding problem in the D.C. Jail last week by transferring more than 100 inmates to federal prisons throughout the country, including such distant spots as Leavenworth, Kan., Terre Haute, Ind., and Duluth, Minn.

Many of those inmates, serving time on misdemeanor charges, were rousted from their beds about 1 a.m. last Wednesday and herded onto buses before their families or lawyers could be notified.

One of the inmates, William Daniels, 22, who is serving time for possession of marijuana after his probation was revoked, called his sister that night from a telephone booth in Michigan to say he was headed for a federal prison camp in Duluth.

"He said he was scared and he was tired because they had been riding all day," recalled Alta Hoffman, the sister, who lives in suburban Maryland. "He said when he gets there he'd have a chance to call again, but I haven't heard anything."

His lawyer, Elaine Mittleman, complained that Daniels and the others "were treated like cattle," adding that, "I don't think that's the way the system should work."

Yesterday, Mittleman obtained an order from a D.C. Superior Court judge releasing Daniels from the Minnesota prison and putting him back on probation.

The mass transfer of inmates did not come as a complete surprise. Barry disclosed last Tuesday, while testifying on Capitol Hill about prison overcrowding, that the federal Bureau of Prisons had agreed to take custody of 130 D.C. prisoners to relieve some of the pressure.

However, Mittleman and the families of some of the affected inmates complained that D.C. corrections officials gave them no warning before transferring the prisoners.

Eugene Anderson, 40, convicted of possessing the drug PCP, had time last Friday to dash off a letter to his girlfriend before he was sent to the federal prison in Allenwood, Pa.

"Just a few quick lines to let you know what's happening," Anderson wrote. "They are shipping a lot of the inmates to different federal institutions, like Missouri, Minnesota and Philadelphia . . . . By the time you receive this letter, I'll probably be transferred to who knows where."

The girlfriend, who asked not to be identified, said yesterday that she read the letter to her 6-year-old son by Anderson. "He started crying and said, 'I'll never see my daddy again,' " she said. "I said, 'You'll see your daddy,' but he was hysterical."

Wesley Watkins, executive director of the local chapter of the American Civil Liberties Union, yesterday criticized the city's "callous" handling of the transfers.

"That violates one of the basic things we talk about: access to family and community," Watkins said. "They corrections officials scatter them all over the country. All it does is it increases the isolation of those prisoners and absolutely destroys any family infrastructure that is there."

Annette Samuels, the mayor's press secretary, referred all questions about the transfers to Department of Corrections officials.

"They're responsible for dealing with that, not us," Samuels said. "That's a corrections activity . . . . I knew the action was to take place, but I do not know the particulars of how they do that. Those are specific operational things I would not be aware of."

Leroy Anderson, a spokesman for the Corrections Department, said he could shed little light on the city's handling of the transfers. "All I know is that they were turned over to the federal Bureau of Prisons and were sent where they could be sent," Anderson said.

The D.C. Jail was designed primarily to hold persons awaiting trial. However, in recent years city corrections officials increasingly have used the facility to house the overflow of convicted felons and misdemeanants from Lorton Reformatory in southern Fairfax County.

Last week, before the transfers were ordered, there were 2,613 inmates at the jail -- about double the facility's capacity.

Kathy Morse, a spokeswoman for the federal Bureau of Prisons, said yesterday that 103 D.C. inmates were transferred to federal prisons late last week: 28 sent to Leavenworth, 21 to Terre Haute, 20 to Allenwood, 17 to Duluth, 11 to Petersburg, Va., and six to Atlanta.

According to Morse, the inmates chosen for transfer were all misdemeanants who could be placed in minimum security facilties. She said the primary factor in deciding where to send inmates was the availability of space.

"We usually try to keep in mind what is closest to home, but you can tell from this that we weren't able to do that," Morse said.

Before the transfers, the Bureau of Prisons held 1,400 other prisoners who had been convicted in D.C. courts.

The transfers are part of the Barry administration's overall response to what the mayor has described as an alarming surge in the District's prison population.

Last week, city officials began planning for a work-release program for at least 60 inmates who have been denied parole until now because they were too hard to place in outside jobs.

The city will hire them temporarily while the D.C. Department of Employment Services attempts to place them in permanent jobs.

Also last week, Barry reluctantly ended his longstanding resistance to a proposal for a new federally financed prison in the District.

He joined forces with Sen. Arlen Specter (R-Pa.) and U.S. Attorney Joseph E. diGenova, who have argued for months that a new facility is needed to handle the bulging prison population at Lorton and the jail.

U.S. District Judge June L. Green recently approved an agreement between the District and representatives of inmates at Lorton that prescribes penalties in the event the city fails to meet deadlines for making improvements at the prison.

The agreement also would penalize the city any time the number of correctional officers available for duty falls below 300.