State contractors entered the state forest this week and cleared three homeless encampments, razing tents and leaving several Islanders without their possessions.

Crews hired by the state Department of Conservation and Recreation cleared the encampments on Monday, after posting notices on trees in the area and talking to people who had been sleeping in the tents.

With the Island’s sky high housing costs and lack of a year-round homeless shelter, the forest has become a place for people with nowhere else to go. But camping in the forest is illegal and DCR has cleared camps once a year for the last four years, said Conor Laffey, the state forest superintendent.

“I don’t really know the solution but it’s not for people to come and live in the state forest,” he said Thursday.

DCR said the clearing was done for public safety and environmental reasons after the sites were found to be littered with trash, feces, vodka bottles, cigarette butts and evidence of fires in pine needles.

“In coordination with state and local law enforcement, DCR routinely clears encampments in state parks to protect the environment, the safety of the public and to maintain our public lands,” the agency said in a statement. “These actions help reduce risks from uncontrolled fires and hazardous conditions; prevent damage and contamination to natural habitats; address unsanitary conditions; and are part of our ongoing work to maintain our public assets and ensure they are safe spaces for all.”

Several police departments were aware of the situation and Edgartown police were there during the cleanup on Monday, according to DCR. The agency said it would continue to work closely with municipalities and public safety officials, as well as local agencies and organizations that help people affected by the clearings.

It’s not clear how many people were staying in the encampment. Sharon Brown, the director of homeless services for Harbor Homes of Martha’s Vineyard, estimated about 20 people were there, though Mr. Laffey said there were only about three people there as of last week.

In the clearing, people’s belongings were rounded up, according to Ms. Brown.

“They took everything, birth certificates, I.D., medication, everything,” Ms. Brown said.

“The [Massachusetts] Department of Conservation and Recreation contacted a private company off-Island, and they came on with some dumpsters and they cleared everything and took it to the dump off-Island,” she said.

One client, whose epilepsy medicine was trashed, was taken to Martha’s Vineyard Hospital after suffering a seizure, Ms. Brown said. Another camper lost her only photographs of her deceased children.

“I’ve been on call after call, with so many tears,” Ms. Brown said.

“I called around to see if there was any way that we could at least get some of the stuff back, especially the identification, but it was all disposed of,” she added.

Harbor Homes and emergency services officials are now working to help replace the confiscated identification documents and prescriptions, Ms. Brown said. They are also trying to find alternative places for the people to sleep, but finding space is proving difficult. There are no shelter beds on Martha’s Vineyard between late April and Nov. 1, and Ms. Brown said nothing is available on Cape Cod either.

“I can’t find one bed right now,” she said. “We have nowhere for them to go [and] we’re afraid to provide more tents and sleeping bags because we’re not sure if this is going to happen again.”

DCR did not touch any of the people’s belongings before July 29, according to Mr. Laffey and several notices were given. He also has gone out to the campsites once a month, offering to help clean up the trash.

The clearing comes as officials have had concerns about the potential for forest fires. Mr. Laffey said he’s seen signs of camp fires and propane grills.

There is no shelter for the Island’s homeless population in the summer. Harbor Homes has been operating a winter shelter on the Martha’s Vineyard Community Services campus but that location closed down at the end of March.

The organization is hoping to create a more permanent shelter and is looking at a potential location in Oak Bluffs but those plans are still in the very early stages.

The article was updated Thursday morning after speaking with a representative from the Department of Conservation and Recreation.