Ghani also strongly condemned the "cross-border" terrorist attack in Pathankot, an inference to Pakistan, and extended condolences at the loss of lives in it.
During the telephonic call, Ghani briefed Modi about the terrorist attack in Mazar-e-Sharif, a PMO statement said.
The Prime Minister expressed deep appreciation for the exemplary bravery and courage shown by the Afghan National Security Forces in thwarting the terrorist attack in Mazar-e-Sharif and ensuring security and safety of the Indian Consulate and personnel, the statement said.
The Afghan President also expressed support at the loss of lives and property in the earthquake in India.
The Prime Minister thanked President Ghani for his message of support at the cross border terrorist attacks and the earthquake.