Updated

Pakistan's military says the spy agencies of Pakistan and neighboring Afghanistan have signed an agreement to share intelligence and carry out "coordinated intelligence operations."

Army spokesman Maj. Gen. Asim Saleem Bajwa said in a Twitter post late Monday that the Memoranda of Understanding was signed between Pakistan's Inter-Services Intelligence and Afghanistan's National Directorate of Security. He did not say when the accord was signed.

However, the announcement from Islamabad came days after Pakistani Prime Minister Nawaz Sharif, along with the country's army chief and head of the ISI, visited Kabul to step up cooperation in the fight against militants.

Pakistan and Afghanistan have long accused each other of sheltering militants, but relations between them have improved since Afghan President Ashraf Ghani assumed power last year.