David Cameron was tonight flying back to London to address the crisis over phone hacking and police links with the media, after cutting short a two-day visit to Africa.
The Prime Minister said that he would use a statement to the House of Commons tomorrow to set out the detailed terms of a judicial inquiry into the issues raised by the phone-hacking scandal.
But he insisted that he would not allow the furore - which has claimed the jobs of two senior Scotland Yard officers and a number of media executives - to distract his Government from other priorities like the economy, jobs, immigration and welfare.
Speaking in Nigeria ahead of his return to the UK, Mr Cameron insisted that he would ensure action was taken to get to the bottom of the affair.
"I don't under-estimate the problems," he said. "Parts of the media committed dreadful illegal acts, the police have serious questions to answer about potential corruption and about a failed investigation, politicians have been too close to media owners.
"These are big problems but we are a big country and we are going to sort them out. We are going to get to the bottom of them through a judicial inquiry and we are going to make sure that they can't happen again.
"That's the duty of the Government I lead and that is the duty we are going to carry out. The British people want to know that."
Mr Cameron added: "The British people want an independent media acting within the law, they want an independent police force always free to pursue the evidence wherever it goes and politicians who are prepared to work together in the public good to get this problem sorted.
"The British public want that and that is what I am delivering."
But he insisted that dealing with the hacking issue did not mean ministers were "taking our eyes off the ball" on voters' priorities like jobs, welfare reform and immigration.
He highlighted talks he had today with Nigerian President Goodluck Jonathan over the 650 or more of his countrymen currently in British jails. The Nigerian Parliament is to discuss new prisoner transfer arrangements which could see them sent home to serve the remainder of their sentences.
"I want to give reassurance to people back at home," said Mr Cameron. "This is a big problem, but we are going to sort it out.
"At the same time, we are not going to take our eye off the ball of getting our economy to grow, getting jobs for our people and making sure we have got a strong immigration and welfare system and doing all the things that the British people are crying out for."
He was challenged over evidence given by former Metropolitan Police Commissioner Sir Paul Stephenson to a parliamentary committee that a senior official at 10 Downing Street advised him not to tell the PM about the appointment of ex-News of the World journalist Neil Wallis as a media adviser.
Mr Cameron responded: "It wouldn't be normal for the Metropolitan Police Commissioner to share a whole range of operational detail about particular operations with the Prime Minister. I wouldn't expect him to do that.
"What I said to him privately is the same as what I said to him publicly, which is that his force should pursue the evidence wherever it goes. And that, it seems to me, is exactly what it is doing, and that is why there has been the arrests of people including Mr Wallis."
Mr Cameron said that both Sir Paul and assistant Met commissioner John Yates had made "honourable decisions" to resign over their links to Mr Wallis - deputy at the Sunday tabloid when it was edited by former 10 Downing Street communications director Andy Coulson.
He described the death of Sean Hoare, whose body was found in unexplained circumstances at his Watford home yesterday, as a "tragedy" for the former News of the World reporter and his family.
After having lunch with Mr Jonathan, Mr Cameron left the presidential palace at around the time when News Corporation chairman Rupert Murdoch and his son James began to give evidence to the Commons Culture Committee inquiry into phone hacking. Former News International chief executive Rebekah Brooks - a frequent social guest of the PM's - was due to give evidence as his plane took off from Lagos airport.
Mr Cameron had already trimmed a planned five-day tour of four African countries to two days in order to return to London to deal with the aftermath of the hearing. He cut it short by another seven hours to give himself time to prepare to address MPs.
He insisted that he had been able to complete "the key parts of my programme" in both South Africa and Nigeria, despite his truncated itinerary.
Mr Cameron said that he and Mr Jonathan had agreed a "shared agenda" to double trade to £8 billion by 2014 and to work on opening Africa up to free trade.
Britain and Nigeria had sealed "a significant new partnership" on counter-terrorism, which would see the UK advise Mr Jonathan's administration on setting up an emergency contingencies committee along the lines of Cobra in Whitehall.
"We now have the chance for a new era in Britain's relations with Nigeria," said Mr Cameron, who has used his trip to promote trade between the UK and Africa.
He added: "I think it is important for the British Prime Minister and the British Government to get on with the things that really matter for Britain, which is making sure there are jobs and investment and exports.
"Visits like this are an important part of that."