To generations of poor and working-class children, summer has been the time for escape — for just awhile — to another world, one of summer camps run by charities and nonprofit groups. These camps were a quintessential New York rite of passage, part of growing up in the city by getting away from its crowded subways and tenements on the Lower East Side or the South Bronx.

That tradition is quietly coming to an end, as soaring operating costs and declining government aid have in recent years shut down many nonprofit sleepaway camps for low-income families.

Between 1985 and 1996, more than a quarter of the state’s nonprofit sleepaway camps were closed, dropping from 435 to 321, according to a study conducted last year by the New York State Camp Directors Association. About one-third of the city’s 37 settlement houses once owned summer camps, said Emily Menlo Marks, executive director of the United Neighborhood Houses, an umbrella organization. But only one still operates a traditional summer camp: Boys Harbor, which was founded during the Depression and is still supported by the Duke family.

The Hudson Guild, a settlement house in Chelsea, closed and sold one of its camps four years ago and recently put its 75-year-old camp in Hopatcong, N.J., up for sale.

Goddard Riverside Community Center, which serves the Upper West Side, closed and sold one camp in 1994 and is negotiating the sale of Camp Wel-Met here in the Catskills, about 100 miles northwest of New York City.

”It killed me to do it, but it’s just incredible what it costs to keep places like these going,” Bernie Wohl, Goddard Riverside’s executive director, said. ”If you want to take poor kids to camp, there’s no way to take them without subsidizing them.”

Goddard Riverside bought Wel-Met from its founder, the Jewish Welfare Board, a decade ago, Mr. Wohl said. Two years ago, faced with mounting deficits, Goddard Riverside eliminated its two-week summer camp programs and instead began bringing about 150 children in day camp here for a few days.

At Camp Wel-Met’s peak in the 1950’s and 1960’s, children stayed for several weeks; some were even sent on bus trips across the country. Up to 1,500 children gravitated here each summer.

”Everybody knew somebody who went to Camp Wel-Met,” Mr. Wohl said. ”Howard Stern went to Camp Wel-Met.”

So has Jose Alicea, 12. For two summers now, he has left his steamy apartment in New York City and spent a few days at Camp Wel-Met. But this will be the last trip here for Jose and 150 other children.

Jose likes pitching tents with blankets and sticks in his room in his parents’ apartment at 104th Street and Manhattan Avenue. He wants to be an architect. ”A lot of kids, they can’t see the stars because of pollution and stuff,” he said. ”They can’t go camping in Central Park.”

Perhaps it is not surprising, especially in the era before air-conditioning, that the United States’ largest camping industry grew around the nation’s largest and most densely populated city. Summer camps also played a more subtle role in the city’s history, offering new perspectives for New York’s children.

Sheila Krumenaker’s parents sent her and her sister Elizabeth to Camp Ohnehtah in Windham, N.Y., in the early 1950’s, paying on a sliding scale.

”My sister and I both feel that if it weren’t for camp, we wouldn’t be the people we are today,” said Mrs. Krumenaker, 58, who now lives in Stamford, Conn. ”Your self-worth went up 17 notches because everything you did, someone lauded. You climbed a mountain and you got an award.”

Behind these activities were the ideologies of individual camps, some of them affiliated with labor, socialist or other political groups.

Charles Hargate Jr., 77, remembered being among the handful of black children at a Jewish camp in the Adirondacks when he was 12. He went only one summer, but some images, including sitting around a fire, never left him. ”That shows you how wonderful it was,” Mr. Hargate said from the Allen Community Senior Citizen Center in Jamaica, Queens.

Maybe more so than for any other ethnic group, summer camp left a lasting impression on Jewish children, said Jenna Weissman Joselit, a historian who curated an exhibit on summer camps at the National Museum of American Jewish History in Philadelphia three years ago.

”From the philanthropists’ view, summer camp was a form of moral uplift: removing children from an inhospitable environment to a more salubrious one,” Ms. Joselit said. ”Implicit in all of this, especially for the children of immigrants, was that summer camps were very often artful ways to make kids American, to teach them sportsmanship and gentlemanly codes.”

After a period of decline, camp directors and industry officials say demand has picked up in recent years, as new immigrant groups have discovered the New York summer tradition. Because of the shortage of nonprofit sleepaway camps, settlement houses, churches and other organizations are offering cheaper alternatives, including day camps that do not provide children with food, housing or extended trips outside the city.

For the last five years, the waiting list for Camp Ohnehtah’s six-week session has kept growing, said Eva Lewandowski, the director for the last 11 years. But rising costs have made it impossible to accept more than 300 girls for the summer, a far cry from 1,200 in the 1970’s.

Compared with a decade ago, the share of the annual budget for staff salaries has doubled. Ohnehtah, like other camps, has hired more skilled workers, partly to reduce the risk of lawsuits that sharply raised premiums for liability insurance. A decade ago, insurance was 10 percent of Ohnehtah’s budget. Today, it is closer to 15 percent.

Rising costs hurt nonprofit camps that in recent years also faced cuts in government funding, especially in Federal child-care programs, industry officials said. What’s more, government cuts to other city agencies had a ripple effect on camps like Wel-Met.

In 1990, Wel-Met earned $215,000 in rental income, mainly from the Board of Education and the City Volunteer Corps, which leased the campsite for training programs. But as those programs were scaled back, the rental income they provided Wel-Met began to decline, disappearing in 1994, Mr. Wohl said. Since then, Wel-Met has lost between $200,000 and $400,000 a year.

Many nonprofit camps are turning to private fund-raising with mixed success, said Jordan Dale, president of the New York State Camp Directors Association. A few with corporate sponsors, like the Fresh Air Fund camps that are supported by The New York Times, have done well.

Exacerbating their financial problems, industry officials said, is the growing number of private camps that draw middle-class children who might otherwise pay full tuition at nonprofit camps and subsidize other children. Between 1985 and 1996, according to the association’s study, the number of private sleepaway camps grew by 20 percent in New York State. Private camps often charge from $2,000 to $3,500 for a four-week program, said Jeff Solomon, executive director of the National Camp Association.

Next summer, Goddard Riverside will keep its day-camp program, Mr. Wohl said. But it will not include the short trip to Wel-Met.

Cindy Zingher, the camp director, had told the children that it would be their last summer here. The news, though, hardly distracted them.

City kids to the core, they screamed when a big yellow butterfly flew by. Jason Patterson, 12, of Brownsville, Brooklyn, leaped off a bench in fear when the butterfly flew close to his face. ”I never had one on me before!” he protested.

Curtis Cotton, a counselor, was having a hard time getting the children safely aboard the canoes. ”I need someone who’s been in a canoe before,” he said.

Charles Phipps, 10, promptly stepped up, clambered into the canoe and stood as straight as a tree.

”You never stand up in a canoe!” Mr. Cotton yelled. ”I thought you canoed before.”

Back on the dock, Charles said softly: ”I haven’t done it in a long time.”

Other children, including Jose Alicea, came to swim.

Jose was a little puzzled. Last summer, there had been a third dog, a three-legged black Labrador named Lucy. This time, he counted Shadow and Comet. But where did the three-legged dog go?

Maybe Ms. Zingher would tell Jose and the others about a blizzard last winter. And maybe, before riding the bus back to New York City, the children would also learn about mortality at Camp Wel-Met.