The angry demonstrators, chanting "death to the Americans, death to the British", set the Council office ablaze and stormed the EU Commission office.
The protests came after Israeli forces smashed their way into a prison in Jericho, following the withdrawal of British and American monitors from their posts.
Foreign Office sources said the UK had contacted the office of the Palestinian President four times since Friday to ask him to "allay our security concerns for the welfare of our monitors".
When the President's office failed to respond, the decision to withdraw the monitors was taken "because we have a duty of care for our monitors", said the sources.
The monitors are there under an agreement brokered in 2002, to observe conditions in the jail, but the Foreign Office stressed the welfare and security of the prisoners was entirely a matter for the Palestinian Authority.
Six Palestinian militants holed up inside thie prison surrendered to Israeli forces this afternoon, almost 10 hours after Israeli troops laid siege to the compound.
Among those who surrendered was Ahmed Saadat, leader of the Popular Front for the Liberation of Palestine, Ahmed Saadat, said to be the mastermind behind the assassination of an Israeli cabinet minister in 2001, the Israeli military announced.
The main target of the raid were Saadat and four accomplices in the killing of Israeli Tourism Minister Rehavam Zeevi. In addition, Israeli foreces seized Fuad Shobaki, the mastermind of an illegal weapons shipment to the Palestinian Authority several years ago.
Israel's West Bank commander, Maj. Gen. Yair Naveh, said 15 other militants were also arrested in the raid.
Palestinian President Mahmoud Abbas said "the American and the British side bear full responsibility for any harm to the lives" of the prisoners.
He said the decision by the UK and US monitors to withdraw "is a grave violation of agreements reached in 2002".
As protesters rampaged through Gaza City, the Foreign Office also warned Britons to stay away from Jericho. Britons are already told not to travel to the Gaza Strip.
Israel said it mounted the raid because the foreign monitors had been withdrawn and blamed the Palestinians for breaching agreements about the prisoners' custody.
A Foreign Office spokesman said: "It has been confirmed that there are no local or UK staff in the British Council offices. They were escorted out much earlier."
As TV pictures showed flames within the building and gunmen outside, the spokesman added: "The Palestinian security forces are in attendance but the pictures speak for themselves."
The Foreign Office said that Britain repeatedly warned Palestinian President Mahmoud Abbas that it would withdraw its monitors from the prison.
"It's quite clear that the security of that prison and the security of the monitors was the responsibility of the Palestinian Authority. We made clear to them what we expected them to do, we gave them a warning."
Mr Straw announced the decision to withdraw the monitors in a written Commons statement today.
He said: "The UK and the US have repeatedly raised our concerns over the security of our monitors with the Palestinian Authority and urged them to meet their obligations under the Ramallah agreement.
"Unfortunately, there has been no improvement. We therefore issued a joint US/UK letter to President Abbas on 8 March 2006.
"This letter said that we would have to terminate our involvement with the mission if the Palestinian Authority did not immediately either fully comply with the Ramallah Agreement (which sets out monitoring arrangements) and make substantive improvements to the security of the monitors or come to a new agreement with the Government of Israel.
"As required by the Ramallah Agreement we informed the Israeli Authorities that we were delivering a letter in these terms.
"The Palestinian Authority has consistently failed to meet its obligations under the Ramallah Agreement. Ultimately the safety of our personnel has to take precedence.
"It is with regret that I have to inform the House that these conditions have not been met and we have terminated our involvement with the mission today, March 14."
The Foreign Office also released the letter sent by the UK Consul General in Jerusalem, John Jenkins, and his US counterpart, Jake Walles, to President Abbas on 8 March.
The letter says the Palestinian Authority has "never fully complied" with the agreement which established the mission.
"While the six detainees - Fuad Shobaki, Ahmad Sa'adat, Iyad Gholmi, Hamdi Qur'an, Majdi Rimawi and Basel al-Asmar - are held in continuous custody at the Jericho prison, the Palestinian Authority has consistently failed to comply with core provisions of the Jericho monitoring arrangements regarding visitors, cell searches, telephone access and correspondence," it said.
"Furthermore, the Palestinian Authority has failed to provide secure conditions for the US and UK personnel working at the Jericho Prison.
"Repeated demarches by our governments to the highest levels of the Palestinian Authority have not resulted in improved compliance with the Jericho monitoring arrangements."
And in a reference to the Hamas-led Palestinian Authority, the letter added: "The pending handover of governmental power to a political party that has repeatedly called for the release of the Jericho detainees also calls into question the political sustainability of the monitoring mission."
The letter adds that, if the mission is to continue, conditions at the prison must either be brought into line with the arrangements or the Palestinian Authority must establish a new arrangement on the detainees with the Israeli government.
If neither happens, "we will have to terminate our involvement with the Jericho monitoring arrangements and withdraw our monitors with immediate effect", the letter warns.
Sir David Green, director general of the British Council, said the building had been "very badly damaged".
"Mid-morning Gaza time a group of masked gunmen came into the building and started firing shots in our information centre," he said.
"We called military operations and within three minutes a large group from the presidential guard arrived to take charge of the situation and, in fact, get the situation under control.
"At which point all our staff vacated the building."
Sir David said on BBC Radio 4's World at One: "Then a larger number of demonstrators, many of them armed, arrived at the building as I understand it the presidential guard could not maintain control and the demonstrators started breaking up the building, set a car on fire and the whole building set on fire.
"And according to our centre manger both the ground floor and the second floor are completely burnt out."Reuse content