Turkey on Wednesday launched an offensive in northern Syria targeting the Kurdish-led Syrian Democratic Forces, a key US ally in the five-year battle to crush the Islamic State group. The SDF lost 11,000 fighters in the US-led campaign.
It is Turkey's third such operation since the start of the war in Syria and has been met with international condemnation.
Prime Minister Imran Khan, however, called Erdogan on Friday to "convey Pakistan's support and solidarity," his office said.
"The prime minister told him that Pakistan fully understands Turkey's concerns relating to terrorism," it said, adding "Pakistan is fully cognizant of the threats and challenges being faced by Turkey having lost 40,000 of its people to terrorism".
Khan told Erdogan that "Pakistan stands in full support and solidarity with Turkey," it said.
"We pray that Turkey's efforts for enhanced security, regional stability and peaceful resolution of the Syrian situation are fully successful," Khan was quoted as saying.
Khan's office said Erdogan would visit Pakistan later this month.
President Donald Trump has faced a firestorm of criticism for appearing to greenlight Turkey's offensive into northeastern Syria, which began after Trump ordered US troops to pull back from the border.
US Treasury Secretary Steven Mnuchin said Friday Trump had authorised -- but not yet activated -- "very significant new sanctions" to dissuade Turkey from further offensive military action.
Prime Minister Imran Khan, however, called Erdogan on Friday to 'convey Pakistan's support and solidarity,' his office said.