A charred body has been discovered inside a torched office at the U.S. Embassy in Serbia's capital Belgrade, embassy officials said Thursday, just hours after several hundred demonstrators attacked the compound.

The swarm of rioters had broken away from a massive rally held earlier in the day to protest against Washington's recognition of Kosovo's declaration of independence.

inside-embassy-cp-4391371

The U.S. Embassy in Belgrade burns after masked attackers broke into the building and set an office on fire. ((Associated Press))

Flames and smoke billowed out of an office on the embassy grounds around 7 p.m. local time after crowds of masked young men broke into the compound and used metal bars to smash into the first floor of the building. A few demonstrators climbed the building and set the U.S. flag on fire as others used a door to ram the metal-barred windows.

"Our embassy was attacked by thugs," White House press secretary Dana Perino said while travelling from Africa with reporters and U.S. officials on Air Force One. "We have made known to the Serbian government our concern and displeasure that their police force did not prevent this incident."

Embassy spokesman William Wenland said all embassy staffers were accounted for, and noted the person who died was likely a protester.

"It appeared to have been a protester who was caught in the fire that had been set by the protesters and not as a result of any interaction with U.S. security forces," Wenland said.

Firefighters quickly extinguished the fire at the embassy, which had been closed for the week, according to U.S. officials. 

Dozens of heavily armed police patrolled the area soon after, while riot police used shields and tear gas to push back the mostly male demonstrators, who then fled into side streets and continued to clash with security forces.

It reportedly took 45 minutes for police and firefighters to arrive on the scene.

State Department spokesman Sean McCormack said the U.S. ambassador to Serbia was staying safe at his home and was in contact with U.S. officials as the clashes were ongoing.

Security officials and marine guards were in a different part of the compound, but no embassy staff were inside the attacked building, McCormack told reporters Thursday afternoon in Washington. The embassy staff live in residences elsewhere in the city.

The Canadian Embassy, which is across the street, was pelted with rocks, Financial Times reporter Neil MacDonald told CBC News from Belgrade. Canada hasn't said whether it will recognize Kosovo.

The neighbouring Croatian Embassy was also attacked by the same group of protesters. Police beat back crowds gathered outside the Turkish and British embassies in another part of the city.

"The rioters are going on an anti-Western rampage," MacDonald said.

The UN Security Council strongly condemned the attack, while the European Union called it totally unacceptable.

Injured protesters 'extremely drunk'

insideserbs-cp-4390833

Serbs gather in front of the National Assembly building during a rally against Kosovo's independence in Belgrade on Thursday. ((Vladimir Gogic/Associated Press))

Doctors at Belgrade's emergency clinic reported treating more than 30 injured, half of whom were police officers. Dusan Jovanovic, deputy chief of the clinic, said most of the injured protesters were "extremely drunk."

The State Department's McCormack called on Serb authorities to provide additional security to the facility and "devote the assets to deal with this situation."

He said Serbian security "wasn't adequate" at the embassy at the time of the attack, and he said the U.S. would hold Serbia's prime minister and foreign minister personally responsible for any further damage.

Serbia's President Boris Tadic, on an official visit to Romania, appealed for calm and urged the protesters to stop the attacks and clear the streets.

While Serbia's ambassador to Canada blamed the rioting on high emotions, he acknowledged nothing justified such violence.

"There is no way Serbia will ever recognize this illegal act," Dusan Batakovic told CBC News. "Therefore it is very difficult to channel the great emotion of stress that has been provoked throughout Serbia."

The attack was the first on a U.S. Embassy since Sept. 12, 2006, when Syrian security guards stopped an attempt to blow up a U.S. compound. The last time a mob broke into a U.S. Embassy was when Iranians seized an American embassy on Nov. 4, 1979, and took American staffers hostage.

PM speaks to crowd

Earlier in the day, about 150,000 people attended a largely peaceful rally outside the parliament building in Belgrade.

insideserbs-cp-4389761

Serb demonstrators stand on top of a bridge after Kosovo police clad in riot gear prevented them from passing at the Merdare border crossing between Serbia and Kosovo on Thursday. ((Visar Kryeziu/Associated Press))

The state railway company provided free service to Serbians who wanted to attend the event, which organizers said will demonstrate Serbia's commitment to holding on to the province of two million people.

Prime Minister Vojislav Kostunica addressed the crowd in front of Serbia's parliament, saying Serbians will never give up their identity or Kosovo.

"Nobody in Serbia will ever have the right to agree to that," Kostunica said.

At a Kosovo border checkpoint, hundreds of Serbian army reservists chanting "Kosovo is ours! Kosovo is Serbia!" hurled stones at police and NATO-led peacekeepers as they crossed into Kosovo. They later dispersed and crossed back into Serbia.

The U.S. embassy warned American citizens to stay away from the Belgrade rally, saying the event may turn "confrontational and possibly escalate into violence."

The Department of Foreign Affairs also "strongly advised" Canadians travelling to Serbia "to avoid all demonstrations and political gatherings and to stay away from areas where they will occur, as they may turn violent without warning."

More than a dozen countries have recognized Kosovo's declaration of independence, which was made on Sunday. They include the United States, Britain, France, Italy and Germany.

Russia, China and Spain have condemned the declaration.

Batakovic on Wednesday urged Ottawa not to recognize Kosovo.

"If we accept this kind of violation of international law, the whole international order is at stake," Batakovic said in an interview from Ottawa Wednesday with the Canadian Press.

With files from the Associated Press