TRIPOLI, Libya (AP) — On the anniversary of the capture and killing of Moammar Gadhafi, Libya is still grappling with the legacy of his four decades of rule as the interim government and the dictator's former spokesman engaged in a war of words amid the ongoing chaos.

The Libyan government said Saturday that its forces had detained Gadhafi's high profile spokesman Moussa Ibrahim, but an online recording from a man purporting to be Ibrahim denied that claim and said he wasn't even in the country.

The conflicting reports, neither of which could be independently verified, reflect the turmoil that has persisted over the past year, leaving the oil-rich North African nation deeply divided. Tensions have spiked as rival forces battle over the city of Bani Walid.

Bani Walid, some 140 kilometers (90 miles) southeast of Tripoli, was the last major city in Libya to fall to the uprising, thanks in part to its protected location in a valley near the mountains. Over the past year, it has seen periodic violence and emerged as the most significant town in Libya still resisting the country's new authorities since Gadhafi was slain near his hometown of Sirte last year.

"We've lost too many people in Bani Walid and we are still losing them so I don't think it's time for a celebration," said Abdessalem Mahfoud, a local neighborhood council member in Tripoli, when asked about the anniversary of Gadhafi's death.

The turmoil in Libya, which overthrew Gadhafi last year with the help of NATO airstrikes, has become a campaign issue in the U.S. presidential race after an attack on the U.S. consulate in the eastern city of Benghazi killed Ambassador Chris Stevens and three other Americans.

For many who fought against Gadhafi, the new Libya cannot be born until the last vestiges of the old regime, fugitives like Ibrahim and towns like Bani Walid, have been routed.

"I don't think things are really moving in the right direction until we finish with Bani Walid because it is stopping us from making a new Libya," said Abdel-Basit al-Mzirig, a former deputy justice minister and now on Libya's human rights council.

A statement from the prime minister office said that Ibrahim was caught at a checkpoint outside Bani Walid while trying to flee a recent uptick in fighting over the town and would be taken to Tripoli for questioning.

However, the government produced no proof of its claim and hours later, Ibrahim had not been seen in public. State television did briefly show a photograph of a man in a hospital bed with a bandaged shoulder which they labeled as the former spokesman, but the veracity of the photo could also not be confirmed.

The urbane, English-speaking Ibrahim became the face of the regime in its final months and was the most well-known former regime figure to remain unaccounted for after Gadhafi's son and heir-apparent Seif al-Islam was taken late last year. The regime's former intelligence chief Abdullah al-Senoussi was later detained in Mauritania and extradited to Libya.

It is not clear what charges Ibrahim might face, but officials in the past have suggested he might be accused of incitement and disseminating false information.

The seven-minute recording, which was posted on Ibrahim's Facebook page, rejected the reports that he had been captured, as well as subsequent, unconfirmed rumors about the detention of Gadhafi's son Khamis, who was reportedly killed last year.

"We are outside of Libya. We have no relations with Bani Walid and no contact with it. We are nowhere near Bani Walid," he said.

Libyans have failed to overcome deep enmities between those who fought to overthrow Gadhafi and former loyalists of the late leader, whose eccentric and brutal rule focused on pitting tribes against one another.

Al-Mzirig said many remnants of the old regime are still working inside the government and only after they have been removed will the country fulfill the promises of the uprising, which began in February 2011 as part of the Arab Spring wave of revolts that swept the Middle East but quickly morphed into a civil war.

This attitude, common among many who fought in the uprising, bodes ill for future efforts to bring rival groups together.

In the year since Gadhafi's death, conflicts have broken out around the country, and despite the unprecedented election of a 200-person national assembly, the central government is weak and power remains with the armed groups that sprung up with the rebellion.

A hard-line Islamist militia in Benghazi, Ansar al-Shariah, is widely believed to have been behind the Sept. 11 attack on the U.S. consulate, although it has denied responsibility.

These groups, especially the armed militias, have often pursued their own agendas, some dating back to longstanding feuds inside a country Gadhafi controlled unchecked for more than four decades.

After Gadhafi was killed, the former rebels negotiated a takeover of the Bani Walid and then looted it, prompting the angry citizens to form their own militia and throw out their new rulers in January.

The tensions boiled over when one of the rebels celebrated for being among those who captured Gadhafi, Omran Shaaban, was captured and allegedly tortured by the Bani Walid militia.

He later died in a French hospital and stencils of his name and face can be seen painted on buildings in Tripoli. As the militias gathered for revenge, the government authorized them to retrieve those responsible for the killing, setting the stage for the current siege.

"We are protecting Libya because there are pro-Gadhafi people in Bani Walid. There are many wanted people there — they are devils," said Omar Saleh, a militiamen with the Libyan Shield manning the Umm Rashrash checkpoint 60 kilometers (40 miles) from Bani Walid. "We haven't started to bombard them yet — we could if we wanted — but we are afraid of hitting civilians."

Libya is still building a national army and transitional authorities depended heavily on ex-rebel forces such as Libya Shield to secure the country.

The civilians, meanwhile, streamed out of the town as the steady thump of heavy machine guns could be heard from miles away.

They said the main road was blocked but they had taken dirt roads through olive groves toward the nearby town of Tarhouna.

Trucks piled high with mattresses and filled with children and women wearing all-encompassing robes were searched by the militia before being sent on their way.

"I left Bani Walid at 5 a.m. There is random shelling there and people are dying, including women and children," Ghaith Hadi Ghaith said as he waited for his car to be inspected. "There is nothing to eat or drink."

He said the shooting was coming from all sides. He claimed the city only had 150 to 160 pro-Gadhafi people, but that was hotly disputed by the militiamen who said there was a list of 400 wanted figures from the old regime and hundreds more gunmen.