By Chloe Arnold
BBC correspondent in Baku
The president of Pakistan, Pervez Musharraf, is beginning a two-day visit to the oil-rich former Soviet republic of Azerbaijan on Thursday.
Musharraf will be looking for agreements on oil and gas
The countries have signed military accords in the past, and the visit is likely to result in closer ties between the two mainly Muslim nations.
The leaders of Azerbaijan and Pakistan make unusual partners.
Historically, the two countries have had little to do with each other. But General Musharraf's visit will put the seal on a burgeoning relationship.
Oil and gas deals
In the past year, the two countries have already signed a defence co-operation deal under which Pakistan is helping to train officers from Azerbaijan.
This week's visit, the first by a Pakistani leader to Azerbaijan, is expected to produce further accords on economic co-operation, which would enable Pakistan to buy oil and gas from Azerbaijan's vast offshore fields.
With its eight million population, Azerbaijan is tiny compared to Pakistan, home to more than 150 million people.
But officials from the two countries say they have much in common.
Both have a majority Muslim population, and both have big issues to resolve with their neighbours. Pakistan is in conflict with India over Kashmir, while Azerbaijan is in dispute with Armenia over the enclave of Nagorno-Karabakh.
A spokesman for Pakistan's embassy in Azerbaijan said General Musharraf's visit was an opportunity for the two partners to deepen their friendship.