Cameron and Jalil spoke after fighters streamed into Tripoli and captured at least two of Muammar Gaddafi's sons, although fierce battles raged in parts of the Libyan capital.
"Both leaders welcomed the remarkable progress made by the Free Libyan Forces and agreed that this is an important time for the Libyan people as they get closer to achieving their dream of a free and democratic Libya," 10, Downing Street said in a statement here.
"Jalil confirmed that they now had the control of the majority of Tripoli although there were still pockets of resistance not just in the capital but across the country.
"The prime minister reiterated that NATO would continue its mission to protect civilians until they are no longer threatened by Gadhafi," the statement said.
Cameron said the Gaddafi regime is "falling apart and in full retreat".
The prime minister said there would "undoubtedly be difficult days ahead", but the Libyan people were "closer to their dream of a better future".
He said the UK could be "proud" of the part it had played, but stressed the future of the country - and Col Gaddafi himself - was up to Libyans themselves.
Rebel forces have taken control of large parts of Libya's capital Tripoli.
However, the Ministry of Defence stressed that fighting was still going on in the Libyan capital and Nato operations - including those by UK forces on strategic targets controlled by the regime - were continuing.