ANKARA, Turkey - The United States needs to give Libya's leaders more time to gain control of the militias that overthrew Moammar Gadhafi before determining how to help the fledgling government, Defense Secretary Leon Panetta said Friday, a day ahead of his historic visit to Tripoli.

While eager to encourage a new democracy that emerged from Libya's Arab spring revolution, the United States is wary of appearing as trying to exert too much influence after an eight-month civil war.

At the same time, leaders in the United States and elsewhere worry about how well the newly formed National Transitional Council can resolve clashes between militia groups in the North African nation.

"The last thing you want to do is to try to impose something on a country that has just gone through what the Libyans have gone through," said Panetta, who will be the first U.S. defense chief to visit Libya.

"They've earned the right to try to determine their future. They've earned the right to try to work their way through the issues that they're going to have to confront."

Ahead of Panetta's visit, the Obama administration announced it had lifted sanctions it had imposed on Libya in February to choke off the Gadhafi regime's funds while it was violently suppressing protests. The U.S. at the time blocked $37 billion in Libyan assets, and the White House said Friday's action "unfreezes all government and central bank funds within U.S. jurisdiction, with limited exceptions."

Recovery of the assets will help Libya repatriate assets from overseas.

But the continuing violence there, including recent skirmishes between revolutionary fighters and national army troops near Tripoli's airport, reflects the difficulties that Libya's leaders face as they try to forge an army, integrating some of the militias and disarming the rest.

Officials acknowledge that the process could take months, and that they can't force the militias to go along.

Panetta said Friday that his visit to the Libyan capital would give him a better sense of the situation and allow him to pay tribute to the people for bringing down Gadhafi and trying to establish a democratic government.

"It seems to me they are working through some very difficult issues to try to bring that country together," said Panetta. "It's not going to be easy."