The police in Hamburg and the city’s court service are bracing themselves for hundreds of arrests during the G20 summit on July 7 and 8.

Special court rooms have been set up in a double-story complex of containers south of the river Elbe. They are located right next to the police’s mass detention facility, which can accommodate up to 400 detainees at any one time.

The judges at the temporary courts will work in three shifts to conduct hearings around the clock if necessary. Up to eight cases can be heard at any one time.

A consultation room where detainees can speak to their lawyers

With US President Donald Trump, his Russian counterpart Vladimir Putin, Turkey’s Recep Tayyip Erdogan and other controversial world leaders in attendance, anarchists and left-wingers from all over Europe are expected to converge on Hamburg from the beginning of July onward.

Read more: Germany tells Erdogan's bodyguards to stay away from Hamburg G20

G20 not welcome

Watch video 01:02 Anti-G20 protests in Germany

Dozens of protest events, from water-based demonstrations to blockades of the summit venue, are being planned. The largest demonstration, titled "G20 Not Welcome Here" on July 8, is expected to attract 150,000 participants. Around 15,000 police will be on duty during the summit days, with officers being drafted in from all over Germany. The authorities and most of the city’s population expect serious trouble over several days.

Read more: Rallies in Hamburg ahead of G20 summit focus on failed asylum seekers

Many of those arrested will be taken to the police detention center which opened last week. The vast building in an industrial area on the outskirts of Hamburg used to house refugees - now it is surrounded by barbed wire and police officers guard the perimeter fence.

Inside are 50 single cells and 70 multiple occupancy ones, medical examination rooms, and offices for sessions with lawyers or translators. The temporary prison can house 150 people on remand and 250 more in preventative detention. According to the police, the National Office for the Prevention of Torture has inspected the facility and assessed it as suitable. It will carry out further inspections during the summit days.

The police mass detention center can hold up to 400 inmates

The detention center and the temporary courts are miles away from the convention center where the world leaders will meet.

Satellite court

The container courts are on the same site as the detention center but separated from it by a metal fence. They are a replacement venue for the city’s main court building, which is just yards away from the G20 convention center. The court service says its operations there could not be guaranteed while the summit is underway. "We are moving out due to the G20 summit, basically because the court building may not always be accessible during the gathering," spokesman Kai Wantzen told DW.

Even ordinary cases listed for July 7, without any link to the G20 protests, will now be heard at the container courts in the south of the city. Full trials, however, will not take place there.

The judges at the satellite court can only decide on someone’s temporary imprisonment. They may remand someone in custody who is accused of having committed an offence. Alternatively, the judges can imprison someone preventively if they are suspected of planning a serious crime. They can be held for up to 10 days. This type of detention is likely to boost the number of arrests during the G20 protests.

Read more: Police, demonstrators prepare for G20 summit in Hamburg

Once the hearing has been held, both types of prisoners will be moved to permanent jails. The justice department is bringing in 52 staff from other federal states. Twelve will be used to help transport prisoners from site to site while the remaining 40 are due to work at the police detention center.

Building and running the temporary courts will cost in the region of 750,000 euros ($838,000), according to the court service. More than 130 judges and many more ancillary staff will work at the court outpost from June 29 until after the summit has finished.