Tripoli, Libya (CNN) -- The regime of ousted leader Moammar Gadhafi and the rebel government -- the National Transitional Council -- have both committed war crimes during the conflict in Libya and someone needs to take control to stop abuses from continuing, Amnesty International said in a report released Tuesday.
The 112-page report detailed many examples of abuses by the Gadhafi loyalists, which included "mass killing of prisoners, torture, enforced disappearances, and arbitrary arrests."
The report also spotlighted what Amnesty called a problem with the National Transitional Council in controlling divergent groups of anti-Gadhafi fighters.
A researcher on Libya for Amnesty International, Diana Eltahawy, told CNN she had overheard screams of pain and the sounds of whipping on a recent visit to a Libyan detention center.
"It is the responsibility of the National (Transitional) Council to investigate these crimes," she said. "We have called on them as Amnesty International to put the judicial processes in place and to make sure that they get a grip on the various armed groups that are currently conducting arrests outside the framework of the law."
The report said rebel fighters have conducted revenge attacks on prisoners and, at one point, conducted house-to-house raids killing people they thought were Gadhafi mercenaries.
"The NTC is facing a difficult task of reining in opposition fighters and vigilante groups responsible for serious human rights abuses, including possible war crimes; but has shown unwillingness to hold them accountable," the report says. "So far, NTC officials have not provided details of any measures taken to address such concerns."
Gadhafi officials could not immediately be reached for comment on the report.
The NTC released a statement about the report Tuesday.
"The Amnesty report is overwhelmingly filled with the horrific abuses and killings by the Gaddafi regime, however there are a small number of incidents involving those opposed to Gaddafi, the NTC strongly condemns any abuses perpetrated by either side," the statement said.
"The NTC is firmly committed to upholding human rights and the rule of law, both international and local, the violation of rights no longer has a place in Libya."
Amnesty said it was up to the NTC to fix these issues.
"It is a war crime for any party to a conflict to kill prisoners," Amnesty said. "The onus now is on the NTC to do things differently, end abuses and initiate the human rights reforms that are urgently needed."
Eltahawy said an Amnesty International team had visited about eight detention centers in western Libya, including in Tripoli and Zawiya, where about 2,300 prisoners were held.
"Many of them told us that they were beaten, some were tortured," Eltahawy said. "In fact, when I was in one of these detention centers I could overhear prisoners screaming in pain and I could overhear the sounds of whipping -- and this was when an Amnesty International delegate is inside the facility. You can imagine what takes place outside this oversight."
The Amnesty report comes a day after the country's interim leader gave a speech from Tripoli and promised to rebuild Libya's institutions and justice system.
"We aim to establish a state of law, a state of welfare, a state where Islamic Sharia law is the main source of legislation," said Mustafa Abdel Jalil, chairman of the NTC. "This matter requires several things, primarily unity of classes and non division and the soul rejection of hatred and envy -- not taking law into your own hands."
Jalil was justice minister under Gadhafi before defecting to join the opposition in February.
The head of the NTC spoke the same day Gadhafi purportedly vowed to "kill until victory" in a message read by an anchor at the Syria-based television station Al-Rai.
Al-Rai, a privately owned station that has, in recent weeks, taken over for Libyan state media in fulfilling a role as Gadhafi's mouthpiece, had previously reported that it would air a message from the former leader.
Because of security concerns, the station decided to delay the broadcast of the video, the anchor said. Instead, he read a statement that Al-Rai attributed to Gadhafi.
"Libyan people have no option but to defeat the coup attempt against the revolution. We cannot surrender our land to the French people so that they may enjoy it. And we cannot become subjects after we were rulers in local committees and local meetings," the statement said.
"We cannot surrender Libya to imperialism once again like the agents/spies want us to now. So we have no option but to kill until victory and to destroy this attempted overthrow."
CNN's Ben Wedeman, Salma Abdelaziz, Jill Dougherty, Ingrid Formanek, Kareem Khadder, Ian Lee, Raja Razek and Phil Black contributed to this report.