The PM stressed the importance of Pakistan “taking action against all terrorist groups”, Downing Street said.
Mrs May and Mr Khan also discussed the need to address the causes of the conflict between Pakistan and India over the disputed territory.
The telephone talks came after Pakistan handed over a captured Indian air force pilot to Indian officials at a border crossing on Friday.
A Downing Street spokesman said Mrs May welcomed Mr Khan’s “commitment to reducing tensions with India”, and the return of Wing Commander Abhinandan Varthaman.
The spokesman added: “The leaders discussed the need to address the causes of this conflict.
“The Prime Minister emphasised the importance of Pakistan taking action against all terrorist groups, in support of global efforts to combat terrorism.
“Both leaders reiterated their commitment to the UK-Pakistan bilateral relationship.”
Tensions have been running high between the two nuclear powers since Indian aircraft crossed into Pakistan on Tuesday carrying out what India called a pre-emptive strike against militants blamed for a suicide bombing in Indian-controlled Kashmir that killed 40 Indian troops.
Pakistan retaliated, shooting down the MiG-21 fighter jet on Wednesday and capturing Varthaman.
Since the escalation, world leaders have scrambled to head off an all-out war between the arch-rivals.
Read more: Brexit: David Mundell and Jackson Carlaw urge backing for PM’s deal to leave EU