Cameron and Sarkozy are the most senior Western leaders known to have visited Libya since NATO launched its military operation earlier this year and forced Moammar Gadhafi out of power.
Cameron was accompanied by British Foreign Secretary William Hague and other senior aides during the visit to Tripoli and Benghazi.
The whereabouts of Gadhafi are unknown but dozens of his aides and family members have taken shelter in Niger. NTC officials were in Niger to persuade the African country to hand over members of Gadhafi government, known to include his son Saadi Gadhafi.
Cameron and Sarkozy visited Tripoli as battles raged between NTC forces and Gadhafi loyalists in the fallen leader's hometown of Sirte on the Mediterranean coast. Television reports showed scenes of street battles but the number of casualties was unclear. Fighting for the control of several military bases and an airport in the area also continued Friday.
Cameron and Sarkozy met with members of Libya's transitional government, including its head Mustafa Abdul Jalil. The British and French leaders also visited a hospital and a military college to talk with civilians injured in the fighting.
Further NATO support to the fledgling administration includes measures that will help the Libyan-led process to become free, democratic and inclusive, British officials said.
The transitional government will continue to receive assistance from military advisers and cash to begin clearing land mines laid across the conflict zones in Libya and help disarm thousands of militia members.
The NTC will receive nearly $1 billion more from Libya's frozen funds and some of that money will go toward weapons disposal and new communication equipment for the Libyan police.
The two leaders had a news conference in Tripoli where they pledged help with gathering evidence of human rights abuses by the Gadhafi regime.
"We want to help you diplomatically, militarily, economically and with your development," Cameron said. "We are your friends but this is your country, your leadership, your plan."
The NATO commitment to the Libyan people wasn't over and that protecting civilians was a priority, the two leaders said, echoing NATO Secretary-General Anders Fogh Rasmussen, who told news media in Europe the military operation could now be in the final stage.
Transitional government forces are demanding air cover as ground operations against loyalist resistance continue.
A new resolution at the U.N. Security Council will provide a framework for international support to the Libyan people, including mechanisms for unfreezing assets.
Libya will resume its seat in the United Nations next week.
Notable deaths of 2014 [PHOTOS]