When the occupants of the 491 Gallery in Leytonstone, east London, play squatters' Monopoly, a variation on the real game, they declare that the place they've lived in for the last seven years is the equivalent to Mayfair on the board game. "This is by far the best squat I've ever lived in," says Sy, an artist.

With its white-walled gallery space, airy rooms and landscaped garden it's easy to see why he and his six housemates find the place so appealing. But it wasn't always like this. The building, owned by Transport for London (TfL), had previously been used as a shooting gallery for heroin and crack addicts.

Recycling bins at the squat

A group of artist squatters came and took over the premises in October 2001. They found human faeces, drug paraphernalia, and swastikas daubed on the walls, along with a collection of bags and purses thrown into the backyard by muggers who dumped them there after emptying them. They set about clearing up the mounds of rubble outside, cleaned and painted the inside and, once the repairs were complete, threw open the doors and invited the local community to use the space for artistic and environmental endeavours.

Local artists as well as those from further afield can exhibit art in the gallery. A Robin Hood principle is applied, and those who have financial means pay a modest fee that subsidises those who cannot afford to pay to display.

TfL has allowed the squatters to stay for more than seven years, although a spokesman says: "We have sought to formalise the relationship with the squatters but it hasn't happened. We are looking at long-term plans for the building."

The squatters, however, believe that TfL has quietly given its blessing to their usage of the building, which would otherwise lie empty or once again be taken over by chaotic drug users or vandals.

Formal or informal caretaking arrangements such as this occur in only a minority of squatting cases, although those who practise what they describe as "community-based squatting" are often keen to seek out such agreements.

Community resource

A bread oven at the Spike project in Peckham

Broadly speaking, squatters range from drug users who use empty buildings to take illegal substances, to those who stay a while, plunder the fixtures and fittings and then move on, to migrant workers in low-paid jobs who can't afford the rents charged by commercial landlords. Those who occupy buildings and turn them into community resources such as the 491 Gallery describe their actions as "positive squatting".

According to Phoenix, a veteran squatter and part of an environmental group called the Circle Community, they are on the increase. He is now on his third caretaker agreement in a squatted property. His advice to others who want to reach an accommodation with a landlord who suddenly finds his or her property taken over is to keep communicating in the early days and weeks after moving in.

"When we squat a building we wait for the landlords to contact us, but once they have we keep calling them and writing to them," says Phoenix. "Many landlords have a stereotypical view of squatters but if you can give them a letter laying out the advantages to them of a caretaking deal - no expensive court costs for eviction and security and repairs carried out for no cost - you might get somewhere."

Getting a landlord to read a letter from squatters is the first step, and setting up a meeting an important second step. "And if you can get the landlord to come to the premises, sit down with you and have something to eat and a cup of tea then your chances of securing a deal increase dramatically," says Phoenix.

In September 2006, Phoenix was one of a group of squatters who occupied a large house in a desirable part of north London. Similar homes in the road were at the time selling for more than £6m. The squatters negotiated a groundbreaking licence-to-occupy agreement with Circle 33 Housing Trust, the organisation planning to redevelop it as social housing.

A spokesman for the trust described the arrangement as "a creative and pragmatic response to the circumstances ... it allows for the building to be secured while planning for its future is still under way."

Phoenix points out: "It can cost a landlord £5,000 a week to have 24-hour security for an empty building. Deals like this can save them money and recycle space. We do it [recycling] with cans, paper and glass, why not buildings."

He and his fellow squatters focus on offering a range of projects to the local community. "Young people need a place to go to keep them off the streets. We offer skateboarding and DJ and rapping workshops."

He admits, though, that some landlords are more intransigent than others. "We once squatted a Ministry of Defence property. They were very efficient and took us to court to evict us pretty quickly."

The Empty Homes Agency, which campaigns for the estimated 840,0000 empty buildings in the UK to be brought back into use, says using buildings is more important than ever in a period of economic downturn. "If a property is left empty it gets damaged," says chief executive David Ireland. "We are hearing a lot about thefts of copper piping. If pipe work is torn out it costs a lot to replace it, so keeping properties occupied is really important."

Flowers, fruit and vegetables are grown in the garden and local musicians rent studio space

Although squatting wouldn't be top of his list, he encourages initiatives such as short-life housing co-ops that can fill empty properties in a more formal way.

One group of squatters thought they had come to the perfect arrangement with south London's Southwark council to caretake an empty building in Peckham and open it up as a community resource called the Spike. They have lived there for more than a decade but have now been told they must leave or find £450,000 to buy the building.

When they arrived, the squatters brought in diggers to clear huge mounds of rubbish in the yard. They converted the area into a lush garden growing flowers, fruits and vegetables. A range of services are on offer such as a wellbeing clinic, yoga, massage and reiki. Local musicians can also rent studio space cheaply.

The Spike scheme gets its name from its past use as a doss-house or "spike". These operated as "shelters of last resort" - George Orwell stayed in spikes in the 1930s. The building in Peckham served homeless and jobless people and the urban poor for more than a century and was used by more than a million people until 1985. In the 1990s, it was used by an arts and crafts project for kids, which vacated the premises in 1998 when it lost its funding. Soon after, the current occupiers moved in.

The council, after originally trying to launch eviction proceedings, offered the occupants a lease and a peppercorn rent at the doors of the court.

Irreversible loss

"This place is a central part of the community," says Donna, one of the squatters who has spent years transforming the place from a derelict dump into a pleasant community centre. "When people are in trouble or have something to celebrate they can come here. There's a real difference between the council providing a top-down space and letting local people take on a space and create something. So much love has gone into building this place up. The loss of it would be irreversible,"

For Sy in east London, allowing creativity to flourish without financial constraints is key to the success of the squat where he lives and works. "We have a no violence rule here and don't allow the use of class A drugs. We want this to be a safe place for children and families. For the first two years, it was like having Glastonbury in your house every day, but over the seven years we have worked 80-hour weeks to clean the space up and make it what it is today. We're proud to be able to give artistic spaces to people who need time to make beautiful things."