Mr Obama said a regional approach was needed to fight terrorism
US President Barack Obama has said his administration will not allow "safe havens" for militants in Pakistan's tribal region bordering Afghanistan.
Mr Obama's comments at his first White House prime-time news conference came as his envoy to the region, Richard Holbrooke, arrived in Pakistan.
Mr Holbrooke, who said he was there to "listen and learn" about the region, began key meetings on Tuesday.
Mr Holbrooke earlier said the situation in Pakistan was "dire".
Mr Obama said Mr Holbrooke would convey his message to Islamabad.
"My bottom line is that we cannot allow al-Qaeda to operate," he said. "We cannot have those safe havens in that region."
Mr Obama added: "We're going to have to work both smartly and effectively, but with consistency in order to make sure that those safe havens don't exist."
The US president said he had appointed Mr Holbrooke as a special envoy for Pakistan and Afghanistan to give a new focus to dealing with terrorism.
"I've sent over Richard Holbrooke - one of our top diplomats - to evaluate a regional approach," he said. "We are going to need more effective coordination of our military efforts with diplomatic efforts, with development efforts, with more effective coordination with our allies in order for us to be successful."
Mr Obama said he had no schedule for the withdrawal of US troops from Afghanistan.
"I do not have yet a timetable for how long that's going to take. What I know is... I'm not going to allow al-Qaeda or Osama Bin Laden to operate with impunity, planning attacks on the US homeland."
Mr Holbrooke met Pakistani Foreign Minister Shah Mehmood Qureshi on Tuesday and will later meet President Asif Ali Zardari and Prime Minister Yusuf Raza Gilani.
Security tops the agenda for Mr Qureshi and Mr Holbrooke
The BBC's M Ilyas Khan in Islamabad says the main Pakistani focus will be trying to squeeze more money out of the US, particularly for reconstruction in the tribal areas and the revival of a US bill pledging long-term assistance that has been gathering dust in Washington.
Mr Holbrooke will be well aware of his financial leverage, our correspondent says, and will be pushing to devise mechanisms that will minimise the role of the Pakistani security establishment in charting the country's geo-political strategies.
The envoy is likely to restate the need for Pakistan to do more to tackle militants and express concern over the recent release of disgraced nuclear scientist AQ Khan from house arrest.
Pakistan in turn has repeatedly criticised US drone attacks on militants in its territory.
The fallout from the Mumbai (Bombay) attacks will also be on Mr Holbrooke's agenda.
Mr Holbrooke will stay in Pakistan until Thursday and is due to visit Afghanistan and India.