Justin Bieber is currently holed up in his hotel in Liverpool, England -- with hundreds of screaming girls outside ... and cops have warned Bieber that it could turn in to a "possible riot situation" and have even threatened to arrest him.

Play video content

Sources connected to Bieber tell us the pop star and his entourage have been warned that if Bieb or his team go anywhere near the balcony ... they will be arrested immediately for inciting a riot.

We're told Team Bieber is following police orders.

TMZ obtained video from the scene (above) showing teams of uniformed officers attempting to control the crowd.

UPDATE: Sources at the hotel tell TMZ, 25 guards have taken up position outside to handle the masses of people -- numbering around 500. We're told surrounding roads have also been shut down.