"It's really a hornet's nest from that standpoint", Trump said.
"I hope that this time, Pakistanis get the message loud and clear that business as usual can not continue". It's not in their interest.
Trump said the USA has made major gains in the fight against the Islamic State during his presidency, arguing the country has achieved more against ISIS in the last eight months than it had in "many, many years combined".
"Pakistan has never had this type of dialogue with the USA and I hope that wisdom and shared national interests will prevail", he added.
"Reduction of safe havens is absolutely necessary", Ghani said.
Ghani had a detailed meeting with Trump on the sidelines of the 72nd UN General Assembly, attended by a record number of world leaders.
"It was agreed that the two countries would stay engaged with a constructive approach to achieve shared objectives of peace, stability and economic prosperity in the region", a statement released by the foreign office said.More news: JPost's Herb Keinon preview's Netanyahu's speech at the UN
More news: Immigration Activists Shout Down Nancy Pelosi Over Trump Dreamer Deal
More news: Facebook releasing 3000 Russian-bought adverts to Congress
Part of Trump's announced strategy is to take a tougher line toward Pakistan for allegedly providing refuge to the Afghan Taliban and other extremist groups. We do not ask for a blank cheque. Problem began with Soviet invasion of Afghanistan and Pakistan has been paying the price in terms of bomb blasts, suicide attacks, acts of sabotage and hosting world's largest number of refugees despite apathy of the worldwide community towards refugee issue.
"We will stop radical Islamic terrorism, because we can not allow it to tear up our nation and, indeed, to tear up the entire world", he said.
Ghani praised US efforts and said there has been "an vast change on the ground". In his remarks, Ghani said as a result of Trump's new Afghan policy there is no longer a cloud of uncertainty.
Pakistan was left fuming after Trump had hurled similar accusations at Islamabad as he unveiled the new Afghan strategy back in August.
Mr. Ghani said, Afghanistan now also have an opportunity for a dialogue with the neighbours on how to work together earnestly to eliminate terrorism and contain extremism.
He said the strategy, which states that USA military engagement in the country will be based on conditions rather than timelines, provided a certainty over U.S. support for Afghanistan which he said the Afghan people had been seeking "for years". "It has much to lose by continuing to harbor criminals and terrorists". "We are training and we're working with them very closely but it's the Afghans that are doing the fighting", he said.