CLEVELAND — With thousands of protesters expected to descend on Cleveland for next week’s Republican National Convention, city officials have devised intricate plans to handle mass arrests should chaos break out on the streets, identifying jail facilities to house more than 975 arrested protesters and keeping courts open for 20 hours daily to process cases.

Twelve judges will be working 10-hour shifts in the Cleveland Municipal Court to handle what could be a flood of cases. And to guard against violence, the authorities have been collecting intelligence on extremist groups to identify any possible threats. The killing of five officers in Dallas last week added urgency to the planning, as officials tightened their security plans for handling what was already expected to be a volatile atmosphere surrounding the nomination of Donald J. Trump.

The convention and the national stage it promises is attracting myriad groups, with agendas that range from white supremacy to in-your-face body art. The groups include the American Freedom Party and Blood & Honour, whose members are white nationalists, along with skinheads and the Westboro Baptist Church, a Kansas-based congregation known for picketing funerals with signs arguing that accepting gay rights has doomed America to be punished. An effort called “Everything She Says Means Everything” is working to have 100 naked women gather outside the convention site, while a bus full of about 21 nuns will also be in town serving lemonade to crowds and asking delegates about their fears for this election cycle.

Despite concerns about widespread unrest, city leaders said they are ready for the convention after more than two years of planning.