Demonstrators could be heard chanting, "Come down supervisors, come down supervisors!"
PHOTOS: Bay Area May Day rallies and protests
A smaller contingent made it past security and into the building, where they attempted to hang a banner from an upper floor balcony. Four demonstrators were arrested for trespassing.
The rest of the demonstration went outside, without any more arrests.
"We are here standing in solidarity with immigrants, and with the communities that are most affected by the militarized police force we have here in Alameda Co. and across the country," said Sarah Pritchard, a protestor.
FULL LIST: Events planned around the Bay Area in recognition of May Day
"We would like Alameda County to declare it a sanctuary county and the first step it could take toward that is to stop it's collaborating with ICE to exert its control over the sheriff and demand that he stop collaborating with ICE," said Isaac Ontiveros, the organizer of Monday's protests.
Sergeant Ray Kelly says of the tens of thousands of people who went through Alameda County jails last year, only 165 were released to ICE.
RELATED: Crowd gathers for May Day rally, march in SF
"The only way we would cooperate with ICE is if there is a federal warrant signed by a magistrate, so it went before a judge, reviewed by a judge that there was an arrest warrant or a court order, that ordered us to hold a particular person then we would do that," said Kelly.
The protests at the county building were over by noon. A larger May Day rally and march is planned for Fruitvale Plaza at 3 p.m. They are expected to march from the plaza to San Antonio Park, about a mile and a half away at about 4 p.m.
For a look at our most recent stories and videos about immigration, click here