Libya's regional militias are fighting one another, leading to a mutual distrust that will pose a challenge to the new leadership, reports CNN.

The rivalry became evident when fighters clashed at a Tripoli hospital, reports CNN. The battle, which occurred at 2 a.m. Monday, was the biggest armed confrontation in the capital in weeks, according to residents. About a half dozen former rebels from Zintan city in the western mountains stormed into the hospital, said doctors.

Some of the former rebels were drunk and wanted staff to hand back a wounded fighter who had been shot earlier in the day, said the doctors. The former rebels wanted to kill the wounded man, but hospital staff declined to hand over the patient.

After fighters in charge of the Tripoli hospital threw out the former rebels, both groups called for backup, and fighting continued around the hospital grounds until 5 a.m.

According to witnesses, both sides used heavy machine guns and anti-aircraft guns.

UN Secretary-General Ban Ki-moon urged Libya's new leaders to quickly secure their chemical weapons, nuclear materials and their shoulder fired missiles, which had been left unguarded during the 8-month long civil war that toppled Muammar Gaddafi's regime, reports the AP.

"We couldn't believe that they were shooting at us. I had to say to them, you are shooting at a hospital, not at Muammar Gaddafi's 32nd Brigade," said Mohamad Hamza, a Tripoli Brigade fighter in charge of security to the Telegraph.

More from GlobalPost: Video: Gaddafi weapons cache found.

"Eventually, after several hours, a Shaikh came from the mosque and persuaded them to stop and they handed over three of them who started it to Tripoli's military council."

The fighting concluded after calls from a local imam, and after senior commanders from both groups talked by phone to their men, according to witnesses, reports the CNN.

According to Salem Abaza, who is in charge of hospital security, said that it was the most serious incident of infighting between the regional militias thus far.

The battle occured as Human Rights Watch warned in a report that the entire population of 30,000 in Tawargha, near Misurata, had been driven out by former rebels for siding with Gaddafi. Human Rights Watch also reported that some of the men from Tawargha, who are predominantly black-skinned, may have been shot or beaten.

More from GlobalPost: Stolen Libyan weapons arrive in Gaza.

“Rivalry between brigades from different cities has not been resolved and it does now pose a threat to Libya’s security," said Peter Cole, a Libya analyst with the International Crisis Group.

“This suggests that the National Transitional Council needs to work harder with the militia groups to bring unity among them.”

The Associated Press reports that the U.N. has said it is ready to help Libya in its transition to democracy, including police training, preparations for elections and the drafting of a constitution.

"We are here to help," said Ban, while praising the Libyans for their courage and determination in ousting Gaddafi.