Pile on: An Occupy protester is arrested amid a crush of bodies at the protest today.REUTERS

Call it a case of law and disorder.

Occupy Wall Street protesters today clashed with the NYPD on the steps of Manhattan Supreme Court — and at least 20 of them may soon find themselves inside a nearby courthouse.

Most of the protesters were arrested across from Foley Square during a tense standoff with police at about 4 p.m.

But at least one was nabbed while trying to run away.

“It’s our sidewalk! It’s our sidewalk!” several chanted as they pushed back against cops setting up netting to keep them off the steps of 60 Centre Street. Charges are pending.

More than 100 marched the 10 blocks from the Zuccotti Park encampment to Foley Square, where some immediately tried to get through to the steps.

Some cops continued to set up the barriers, while others used bullhorns to order the group to keep moving. Those who were not arrested hustled back to Zuccotti Park.

Earlier, a 26-year-old man believed to have been crashing with the protesters was bust­ed for urinating on an NYPD van parked outside Zuccotti, cops said.

Edgar Rivera, described by cops as a Guatemalan immigrant and Queens resident, was caught at about 1:20 a.m. relieving himself on the vehicle from Brooklyn’s 70th Precinct near Trinity Place and Church Street.

He tried to escape but was collared half a block away, cops said.

“What did I do?” he demanded to know as he was taken into custody, according to arresting officers.

Rivera was charged with disorderly conduct.

You have the right to remain silent: A protester yells while being arrested at a rowdy Occupy Wall Street protest. (REUTERS)