The understanding came during a telephonic conversation between Prime Minister Nawaz Sharif and Turkish President Recep Tayyip Erdogan.
During the conversation that lasted for about 45 minutes, the two leaders discussed at length the situation in the Middle East.
They stressed that Houthis do not have any right to overthrow a legitimate government in Yemen and affirmed that any violation of the territorial integrity of Saudi Arabia would evoke a strong reaction from both the countries.
They also agreed to hold regular consultations for peaceful resolution of the deteriorating situation in the Middle East.
Turkey has publicly supported fellow Sunni Muslim Saudi Arabia and its Gulf allies against the Iran-allied Houthi insurgents in Yemen. Sunni-majority Pakistan voted on Friday not to join the campaign although it remains a staunch Saudi ally.
Turkey, which has the second-largest army in the NATO military alliance, has not taken an active role in the operations in Yemen so far, although it has said it is able to offer logistic and intelligence support.