The court had just started the hearing over vote fraud charges brought by Bemba when the court was attacked, said Denis Tabiana, a member of Bemba's coalition who was in the room.
The fire followed violence earlier in the day, when pro-Bemba protesters retreated from police towards Bemba's official residence. Bemba's security guards fired at the police, according to witnesses.
The gunfire broke out at around 1000 GMT and lasted for nearly an hour. Around 100 judges, lawyers and journalists were trapped inside the court building.
United Nations peacekeepers, who had tanks positioned outside the court, did not immediately intervene and some left the area. Many of the police officers also fled.
When the UN forces returned at around noon, around 50 of Bemba's supporters began throwing stones. They threatened to burn the court down and began looting its offices.
The peacekeepers then fired machine-gun rounds into the air to disperse the protesters.
There was no immediate news of casualties.
The public court hearing on the election result was suspended after Bemba's lawyers protested at the composition of the legal panel. Kalonda Kele, the presiding judge, protested at the violence outside.
"We can't work in this climate of insecurity," he said.
Bemba, one of DR Congo's four vice-presidents, formally contested the outcome of the election vote on Saturday after the Independent Electoral Commission (CEI) announced a win for Joseph Kabila, the country’s incumbent president.
The Supreme Court then had seven days to rule on the challenge to the results, which gave Kabila just over 58 percent of the vote, compared to Bemba's 42 percent.
International election observers have said irregularities noted during the ballot are insufficient to overturn Kabila's lead of 2.6 million votes.
The administrative district, where both the Supreme Court and Bemba's residence is located, witnessed clashes in August between rival troops of the president and his deputy, which left at least 23 people dead.
Violence flared there again on November 11, this time between civilians, Bemba's military guard and the police, claiming four lives.
Concern remains high in the diplomatic community over the presence of Bemba's 1,000-strong armed security force in the centre of Kinshasa.
Bemba's forces have refused to leave the capital, despite an agreement to that effect on November 13.