A high court judge has ordered that squatters evicted from a former RBS building in central London should be allowed back in to provide a free Christmas lunch to homeless people.

The squatters, calling themselves the “Love Activists”, took over the vacant building earlier this week and planned to provide a free Christmas dinner in protest at the capital’s housing crisis.

Most of the activists left the building when the bailiffs turned up with a court order early on Wednesday, but two refused to leave and took to the ledge of a 10-metre-high balcony as a police officer stood nearby.

Scotland Yard said the pair, a man aged 22 and a woman aged 21, came down on Wednesday evening and had been arrested on suspicion of breaching a court order.

A spokesman said: “They currently remain in custody at a central London police station.”

The activists had been vowing to maintain their protest, on the ledge of the first-floor balcony of the grade II-listed building on the corner of Charing Cross Road and St Martin’s Lane, during Christmas day.

But on Wednesday evening a high court judge amended the injunction evicting them to allow them to re-enter solely for the purpose of “preparation, serving and participation in a festive Christmas lunch for homeless people” on Christmas Day.

Despite the court order the police were continuing to bar the activists from re-entering the building on Wednesday night, with about 20 people remaining on the pavement outside.

Police did not confirm activists’ claims that they had been told a bailiff had to be found before they could be readmitted.

It remains unclear whether or not the activists will be able to provide Christmas lunch in the former bank on Thursday.

Squatters and police https://t.co/ozMh7rLhUI — Hannah EllisPetersen (@HannahEP) December 24, 2014

About 10 police officers had been at the scene throughout Wednesday, with a police van and ambulance on standby as concerns grew for the safety of the balcony protesters. Temperatures had dropped sharply, prompting paramedics to warn that they risked losing their balance if they refused to come down.

One of the squatters on the balcony, Danny Freeman, 22, earlier told the Guardian: “We heard banging on the door at 8am and some people forced their way in. We don’t know who they were because they wouldn’t tell us and have not provided us with any paperwork.

“I climbed on to the balcony and then I called the police. I can’t put into words how distressed I feel about this. We won’t be able to provide Christmas lunch for the homeless now and about 50 people who were sleeping here will be homeless over Christmas. I’m here for the long haul, I’m not planning to come down from the balcony. I’d rather spend Christmas here than in the cells.”

Love Activists protesters in central London. Photograph: Diane Taylor

In October, Freeman carried out a protest by standing on a Winston Churchill statue in Parliament Square in London in a 28-hour standoff with police.

About 50 protesters – including some who said they were homeless – turned up at the pavement below to support the occupation with chants of “homes not banks”. The standoff was mostly peaceful, but police officers at one point scuffled with a protester who tried to push back their barriers.

Pete Phoenix, one of the protesters, was invited inside the building by police negotiators to speak to the protesters on the balcony and later spoke with the high court judge before she amended the injunction.

He said: “There are ambulance staff, police officers and police negotiators inside the building. The ambulance staff have warned the protesters that their legs have got very cold which makes the blood supply pool in their feet, this could lead them to faint and fall off the ledge. They are getting very cold and we are concerned about them.

“They are very determined and say they believe the cause they are protesting about is so important that they are prepared to be arrested. They have refused requests from the police negotiators to leave the balcony.”

In a video from earlier this week , the squatters explain how they are seeking new solutions to the city’s housing crisis. Video: Ross Domoney

The occupation came after the owner of the building, Greencap Ltd, was granted an emergency high court injunction on Wednesday morning, allowing bailiffs to evict individuals named in court as “persons unknown”.

Protesters had urgently sought an out-of-hours hearing with a high court judge to vary or discharge the court order to allow them to serve a Christmas Day meal to the homeless.

Paul Ridge, a solicitor from the law firm Bindmans who has been offering legal advice to the protesters, questioned the need for Greencap to bring an emergency injunction. “The protesters were issued with a without-notice injunction from the high court but I don’t think the urgency was there to justify an injunction of this kind,” he said.

Protesters lie on the ground next to police outside the old RBS building near Trafalgar Square. Photograph: Hannah Ellis Petersen/Guardian

Built in 1890 by Robert Walker in Portland stone and listed by English Heritage as a site of special historical and architectural interest, the property boasts a penthouse suite with aerial views of the capital, dozens of rooms, spaces for entertaining, and a secure vault in the basement.

Outside on the pavement, they had plentiful supplies of broccoli, potatoes and other vegetables and a supermarket trolley piled high with rucksacks, a couple of guitars and a dog named Zeus.

“We will stay up on the balcony for as long as it takes,” said a 21-year-old woman who gave her name as Mouse.

Short video message from the two squatters on the balcony https://t.co/Jt1LhSVG3O — Hannah EllisPetersen (@HannahEP) December 24, 2014

The tense atmosphere was broken by passersby who gave protesters fruit and cakes, and a friendly police officer who corrected a spelling mistake in chalking on the pavement: “Trying to help homeless evicted on Christmas Eve.”

A Metropolitan police spokesman confirmed that officers had been called in by the bailiffs to prevent a breach of the peace. No arrests had been made at the time of publication.