For at least three decades, gay and transgender inmates had their own housing unit inside Rikers Island's sprawling jail complex. To be admitted, all a new inmate had to do was declare homosexuality, or appear to be transgender, and ask to be kept out of Rikers's main jails.

The idea, city correction officials said, was to protect vulnerable inmates who might otherwise become victims of discrimination or sexual abuse in the rough world of the general inmate population. The only other metropolitan jail to separate gay and transgender inmates is Los Angeles County Jail. Gay inmates there, however, are forced to live separately from other inmates.

But at Rikers Island, gay housing, as it is called by New York correction officials, is about to end. On Nov. 28, the Correction Department stopped admitting new inmates to the unit. In a few weeks, the unit, which still holds about 50 people, will be no longer.

Under the new rules, gay or transgender inmates who want protection from general-population inmates must apply for it in a special hearing, correction officials said. If granted, the protective custody requires inmates to be held in individual cells for 23 hours a day, just as inmates punished for disciplinary reasons are held.

Martin F. Horn, the city correction commissioner, said gay housing was ending as part of a larger reorganization of inmate housing to improve security. The change of policy, he said, will increase jail safety among gay and transgender inmates.

Though originally intended to promote safety, gay housing became a dangerous wing at Rikers because it mixed weaker inmates seeking protection with violence-prone inmates seeking to prey on them, Mr. Horn said. Some inmates who were not gay, he added, would request to be placed in the unit as a way to avoid their enemies in the general population, or to take advantage of a group they perceived as weak.

"It was the only area of the department where inmates could choose where they wanted to live," irrespective of the security classification each inmate receives upon entering the jail system, Mr. Horn said in an interview. "What we ended up with was this housing unit where people were predatory and people were vulnerable. The very units that should be the most safe, in fact, had become the least safe."

The elimination of special housing for gay and transgender inmates has outraged some critics, who say that Mr. Horn's new policy essentially punishes pretrial detainees, who have not been convicted of any crime, for their sexual orientation. It also forces these inmates, their advocates say, to choose between the possibility of being abused in the general population or being locked up alone for 23 hours a day.

"This is not a change for the benefit of the prisoners, this is a change for the benefit of the administration," said Carrie Davis, a social worker at the Lesbian, Gay, Bisexual and Transgender Community Center in New York, whose clients include former Rikers inmates. "What they're saying is, people who by virtue of immutable physical characteristics are going to be put in 23-hour lockdown," she added. "Does that sound fair?"

Other inmate advocates say the new policy contravenes city regulations and at least one state court ruling. In 1982, the Appellate Division of State Supreme Court, Second Department, ruled, in Schipski v. Flood, that Nassau County's policy of holding protective-custody jail inmates in lockdown 22 hours a day was unconstitutional. The new policy also violates regulations created by the City Board of Correction, a jail oversight agency, that stipulate which type of inmates can be placed on lockdown, said D. Horowitz, a lawyer with the Sylvia Rivera Law Project, a Manhattan-based group that represents transgender clients.

Thomas Antenen, a spokesman for the Correction Department, said that department lawyers believed the 1982 case was different because it involved a blanket rule for protective-custody inmates. New York City, he said, assigns protective custody case by case. Hildy J. Simmons, the board's chairwoman, did not return calls seeking comment yesterday.

Matt Foreman, the executive director of the National Gay and Lesbian Task Force, said his organization and about 15 others were seeking a meeting with Mr. Horn to come up with an alternative method of separating vulnerable gay or transgender inmates. "Our hope is that this decision can be modified significantly," Mr. Foreman said.

NEW YORK -- One of the nation's few jail dormitories specifically for gay or transgender prisoners is closing on Rikers Island, prompting complaints from some activists who say it is a needed safe haven.

The unit, which opened on the city's island prison complex in the late 1970s to assuage complaints about abusive treatment of homosexuals, stopped accepting new inmates last month at the direction of Department of Correction Commissioner Martin Horn.

The facility could be shut entirely within the next few weeks, the department said. It has space for 146 prisoners but was holding 126 when it began emptying on Nov. 28. Fifty-six prisoners remained Thursday.

Plans call for the specialized unit to be replaced with a new protective custody system that would be available to prisoners who feel threatened, regardless of their sexual orientation.

The change has alarmed members of some civil liberties and gay rights groups, who note that the new protective housing would likely be more restrictive than the old unit.

Prisoners whose safety was at risk would be locked in their cells for 23 hours a day, rather than be allowed to mingle with other inmates. Prisoners could avoid the extra restrictions by staying in the jail's general population, but there, they might be subject to harassment or worse, activists said.

"We're not talking about people calling you names," said D. Horowitz, a legal fellow at the Sylvia Rivera Law Project. "People should not be punished for wanting to be safe."

Eighteen groups sent a letter to Horn on Thursday asking him to reconsider, including the Lambda Legal Defense and Education Fund, the Legal Aid Society, the New York Civil Liberties Union and the National Gay and Lesbian Task Force.

Correction Department spokesman Tom Antenen said the unit, which held only a fraction of the gay inmates at Rikers, was being done away with as part of a broader restructuring of the jail's prisoner classification system.

Jail administrators have no intention of ignoring Rikers inmates who say they feel threatened because of their sexuality, Antenen said.

"If that is the case, and they need to be protected from the general population, then we will endeavor to provide the best possible security," he said. That could include a "23-hour lockdown," or it might entail moving them to a different city facility.

More than half the prisoners in the pretrial detention center at Rikers are there for five days or fewer.

Specialized housing units for gay prisoners are rare in the U.S., although jails in a few other places do have them, officials said. The Federal Bureau of Prisons does not maintain such units anywhere in the country, nor do state prisons in New York.

Transgender activist Mariah Lopez said she knows firsthand the difference between the specialized unit and regular housing at Rikers, having been imprisoned in both on prostitution charges.

Outside of the protective unit, Lopez said she was subject to taunts and physical abuse, while inside guards and prisoners alike are "generally more sensitized" to issues of gender identity.