The group of about 20 armed and masked men, said to be demanding work, occupied the building at dawn.
The action was also in protest against - among other grievances - the sacking of 53 public security staff and the appointment of Musa Arafat as a general chief of public security.
By midday the men left peacefully after saying President Yasir Arafat had agreed to reinstate comrades dismissed from the national security forces.
Meanwhile, Israeli occupation troops destroyed six Palestinian homes in the Rafah refugee camp, in southern Gaza, Palestinian security sources said, recalling a massive demolition operation in May that sparked international outrage.
Gaza has been beset by unrest for the past two weeks, sparked by armed groups linked to Arafat's own Fatah movement protesting against corruption and carrying out a string of attacks.
Among the latest incidents, a police station in al-Zawaida, a village near Dir al-Balah, was burned to the ground by unidentified assailants, witnesses said. There were no reports of casualties.
Violent protests erupted last weekend after Arafat appointed his cousin Musa Arafat, who has been denounced by opponents as corrupt, as the new overall head of general security for all the territories.
Arafat later backtracked, saying Musa would only head up the general security branch in the Gaza Strip.
Palestinian prime minister Ahmad Quraya, who has been battling Arafat for control of the security services, also tendered his resignation last Saturday after a spate of kidnappings, but Arafat has refused accept it.
Instead, he has called on Quraya to carry out a radical shakeup in his cabinet in order to deal with the crisis.
Palestinian negotiations minister Saib Uraiqat warned on Friday the Palestinian territories were sliding into "chaos."
In Rafah, meanwhile, a pair of Israeli bulldozers backed by tanks smashed apart six houses and damaged several others in the refugee camp's G Block, the security sources said.
The UN's agency for Palestinian refugees UNRWA said about 10 families numbering 50 people had been left homeless.
In May, 298 buildings were demolished and almost 3800 people made homeless in Rafah in the biggest and deadliest army offensive in the Gaza Strip since the September 2000 launch of the Palestinian uprising, according to the UN.
Operation Rainbow was only part of a string of raids into Rafah which the Israeli military has said are aimed at smashing tunnels used to smuggle in weapons from under the border with Egypt.
Also on the ground, Israeli military sources said troops had detained five wanted Palestinian activists overnight in the West Bank, but did not identify them or give further details.