Members of two rival groups have opened fire at a courthouse in Istanbul, local media report, citing police. At least one person has been injured.

Footage from the area shows people lying on the ground as they try to shield themselves from bullets.

Some 20 people have been arrested, Hurriyet reported, noting that a brawl also erupted after police arrived at the scene.

The gun battle broke out between members of rival gangs involved in a murder trial that is taking place inside the courthouse, according to Yeni Safak.

Early reports suggested the incident took place outside the courthouse, rather than inside.

Sputnik has reported that the two groups are rival gangs, and that the fight may have been caused by the killing of one gang's leader.

The injured person, identified as K.G., was reportedly being tried for a murder committed eight months ago in Istanbul's Gaziosmanpaşa district, according to Hurriyet.

A child was also taken to hospital, though it is unclear whether that was due to shock or physical injury, according to the media report.

Sputnik has reported multiple injuries.

Specialist police units have been deployed to the area and authorities have cordoned off the site. A police helicopter was also deployed.

Police are currently searching for others involved in the incident.