Libya's interim president has visited a mountain town controlled by fighters loyal to slain dictator Muammar Qaddafi in a reconciliation bid aimed at reintegrating it with the rest of the country, officials said.

Bani Walid, a town of some 100,000 residents some 90 miles southeast of Tripoli, was the last stronghold for Qaddafi loyalists, falling in October 2011 days after the leader was killed by revolutionary forces.

But Qaddafi loyalists rose up again in January and retook the town, expelling ex-rebels and dozens of their family members. It remains isolated from the rest of Libya, highlighting the weakness of a central government that lacks strong security forces to impose authority on the numerous local militia groups which dominate much of the country.

Parliament spokesman Omar al-Houmidan said in a late Monday news conference that President Mohammed el-Megarif visited the town earlier that day to achieve national reconciliation. He said locals pledged to hand over anyone there wanted for crimes.

Houmidan said Bani Walid residents agreed to release three prisoners, including one revolutionary fighter whom he says was among those who captured Qaddafi. The dictator was later killed.

Bani Walid is the country's most visible challenge to the uprising that overthrew Qaddafi. Residents say that pictures of the slain dictator are shown in public during weddings and youths play his speeches in their cars' stereo systems.

Townspeople rarely fly the new tricolor flag that replaced Qaddafi's all-green banner, students in schools refrain from singing the new national anthem, and teachers refuse the revised curriculum.

Emotions still run high from the civil war that left tens of thousands dead. Representative of Bani Walid's anti-Qaddafi revolutionary fighters al-Mubarak al-Fatmani said the interim president's visit was a "betrayal of the blood of the martyrs."