D.C. Mayor Marion Barry announced late yesterday that he has signed the controversial legislation ending the city's policy of providing unlimited shelter and assistance to the homeless, after indicating earlier in the day that he might veto the measure.

The bill, approved this month by the D.C. Council, changes the 1984 law known as Initiative 17. It places a variety of restrictions on the amount of time homeless people and families can remain in shelters, while requiring homeless people with incomes to contribute part of that income to subsidize their shelter.

Barry also said he intends to veto council-passed legislation preventing his administration from furloughing up to 26,000 city workers this summer -- a move the mayor favors to help close a projected $95 million budget deficit. The council passed the bill earlier in the week.

"I'm opposed to the furloughs," Barry said in an interview on WAMU radio. "But the city council, led by David Clarke, has not appropriated enough money to balance this year's budget."

Clarke and other council members have contended that Barry is overspending the budget approved last year by the council.

During the same morning interview on WAMU, Barry was asked by host Bill Redlin: "You appeared and spoke very eloquently at homeless advocate Mitch Snyder's funeral earlier this week. Do you plan to veto the permanent legislation revising Initiative 17?"

"Well, probably so," Barry replied. "I have not yet made a permanent decision."

In fact, city officials said, Barry had signed the legislation the night before and sent it back to the D.C. Council for transmission to Congress for review.

Lurma Rackley, Barry's press secretary, said Barry "misunderstood the question."

"The confusion came up in the way the question was phrased," Rackley said. "There can be no question about where the mayor stands . . . . His general position has always been that Initiative 17 has been draining the city."

In a statement released later, Barry cited the rising cost of homeless shelter -- from $9 million in 1985 to $35 million in 1989 -- as justification for the new legislation.

"Many of us in government have thought that Initiative 17 tied our hands and hindered us from investing resources in long-term solutions to the problem of homelessness," Barry said. "While we are amending this law, we are no less committed to caring for those among us who are without shelter."

Barry's signing the bill dismayed advocates of the homeless, who said they had previously received indications that Barry might veto the measure and were jubilant after hearing Barry's remarks on the radio.

"The mayor lied," said Susanne Sinclair-Smith, director of the Washington Legal Clinic for the Homeless.

"I can see why he wouldn't want people to know he signed the bill," she added. "It is one of the most repressive measures in the country . . . . It is a statement that he is abandoning homeless people."

Sinclair-Smith said advocates for the homeless would press their effort to obtain 20,000 signatures to put the matter to a referendum this fall to reverse the city's action.

Carol Fennelly, a leader of the Community for Creative Non-Violence, which operates the largest homeless shelter in the District, said the mayor told Bishop George Augustus Stallings Jr. at lunch Thursday that he planned to veto the council's legislation.

"We were just chilling out and thought the war was over," she said. "I'm shocked and dismayed and disappointed in Mayor Barry."

While discussing Initiative 17 during the morning radio interview, Barry said, "I don't see any connection between Mitch Snyder's unfortunate death and a basic disagreement that most of us in the executive branch and the city council had about reforming Initiative 17."