NEW YORK (AP) _ A Columbia Law School graduate who has been living on the city's streets for months agreed Thursday to enter a private counseling program, an advocate for the homeless said.

The homeless man, identified only as Garry, agreed to the counseling as an alternative to being taken into custody and brought before a state judge who had issued a warrant for his apprehension, said the advocate, George McDonald.

''I told him I'd take him into court with the warrant, one way or another, but it was going to be over,'' said McDonald, who had been leading a search for the man on behalf of his mother and concerned college classmates.

Peter Beitchman, an official of the private counseling agency, The Bridge Inc., confirmed McDonald's account and said Garry was staying at an apartment provided by his organization, which counsels mentally disabled adults.

McDonald said he spotted the man in Grand Central Terminal at about 4 p.m. - recognizing him from photographs and friends' descriptions - and asked if he were Garry. The man first denied it, then admitted his identity, McDonald said.

McDonald said he offered to take Garry to The Bridge and threatened to call a police officer to enforce the warrant, issued by state Supreme Court Justice Andrew Tyler, if he refused.

''After an hour of conversation he decided to accept the private help,'' McDonald said. ''As a matter of fact he's a real happy guy now. Because his life on the street is behind him.''

He declined to put The Associated Press in contact with the man.

McDonald said Garry, 28, has wandered the streets since spring. An Alabama native, he worked as a clerk for a federal judge in Montgomery, Ala., after graduating from Harvard College and Columbia Law School, friends have said.

Garry became depressed after breaking up with his girlfriend and failing the Florida bar examination in 1984, his friends have said. He moved back to New York and eventually onto the streets, they said.

McDonald, an independent activist on behalf of homeless people, it was just by chance he spotted Garry. McDonald said he was in the railroad terminal to investigate the death of a homeless woman there on Christmas Day.

Beitchman declined to comment in detail on the matter, but when asked about McDonald's report of finding Garry and bringing him to The Bridge, he said: ''All of that is true.''

Beitchman said he is associate executive director of The Bridge, which he described as a 31-year-old, not-for-profit mental health rehabilitation agency.

Sgt. Matthew McGeever of the police's Central Warrant Unit, which had been seeking Garry, said McDonald had discussed the matter with police Thursday evening, but said he had no information on any developments.