Pakistan's Prime Minister Nawaz Sharif will visit Riyadh and Tehran in a bid to mend ties between the archrivals after the Saudi execution of a prominent Shiite cleric led to mob attacks on the kingdom's diplomatic posts in Iran.

Federal Information Minister Pervaiz Rashid said Saturday that Sharif would depart Monday for Riyadh, where he will meet with King Salman. Pakistan and Saudi Arabia are longtime allies.

On Tuesday Sharif will meet with Iran's President Hassan Rouhani in Tehran.

The Pakistani prime minister will be accompanied by his country's military chief, Gen. Raheel Sharif.

Sunni Saudi Arabia and Shiite Iran back opposite sides in the wars in Syria and Yemen. Saudi Arabia cut diplomatic ties with Iran after the attacks on its diplomatic posts.