Police clashed with Occupy protesters and dozens were arrested in Oakland, Calif., early Thursday, hours after thousands of demonstrators shut down the Port of Oakland for hours.

According to Occupy Oakland’s website, police had “stayed clear” when as many as 10,000 people marched through downtown Oakland Wednesday afternoon. By evening, Occupiers said the crowd had swelled to 20,000 (police estimated that there were about 3,000 protesters, according to the Associated Press), and that their arrival at the Port of Oakland eventually forced its complete shutdown.

Port officials confirmed to Occupiers that its workers were sent home.

“As of 8 p.m., the police remained hidden out of sight,” the blog post read.

But that changed later. According to the Associated Press, a confrontation was sparked between the police and protesters when Occupiers built a bonfire in the middle of a street in downtown Oakland. Dressed in riot gear, dozens of police told demonstrators to clear out, before firing tear gas and “flash bang” grenades at the crowds.

Occupiers walked around the streets of Oakland with cloths covering their faces and chanted “Whose streets? Our streets,” the AP said, while some engaged in a standoff with police officers.

According to the Oakland Tribune’s live blog of the protest, Occupiers took over a vacant building that formerly housed the Traveler’s Aid Society, while Mayor Jean Quan relayed a message to protesters to call her to discuss their occupation of the building.

A little before 2 a.m. local time, protesters said a man was injured after being hit with a rubber bullet, and an ambulance took him away shortly afterwards. Police chief Howard Jordan said between 30 and 40 people were arrested in downtown Oakland, the Tribune said.

In a letter to the Oakland community on Tuesday ahead of the expected protest at the port, the executive director and president of the Port of Oakland said they “understand the frustrations and issues at the heart of the Occupy movement.”

But despite the economic challenges facing the port as well as the community, Omar Benjamin and Pamela Calloway noted that the port generates over 73,000 jobs in the region.

“From our maintenance staff, to our custodial workers, our truckers, to office workers and dock workers, the Port is where the 99% work,” they said. “It is essential for the economic development of the City and region that the perception and reality of Oakland is stability, safety, and inclusion.”