DUBLIN — The police in Northern Ireland arrested four men on Sunday in connection with a car bombing outside a courthouse in central Londonderry the night before that drew condemnation from across the political spectrum.

The bomb, which had been planted in a hijacked delivery van, caused no casualties or major damage. But after receiving a warning, the police had little time to evacuate children from a youth club nearby and hundreds of people from a luxury hotel and a masonic hall before the device exploded around 8.10 p.m. Saturday.

The explosion followed a pattern of attacks in the city attributed to republican groups opposed to the peace agreement that ended the “Troubles” in Northern Ireland 20 years ago.

The delivery van used in the attack had been hijacked shortly before in Brandywell, a nearby nationalist area of the city. The police arrested two men in their 20s, then later on Sunday detained two others, age 34 and 42, Reuters said. The police did not identify them or provide a possible motive.