Why are some parts of the world rich, and other parts poor? In the west many of us live in conditions almost unimaginably more comfortable than billions of people in regions where economic growth and development have been slower. Inequality defines our world. As the Nobel prize-winning economist Robert Lucas put it, once you start thinking about what causes these stark differences, it can become hard to think about anything else.

This “great divergence” is even more intriguing given how relatively recent it is: 500 years ago the west was no richer than the far east, while 1,000 years ago, the Islamic world was more developed than Christian Europe in everything from mathematics to philosophy, engineering to technology, agriculture to medicine; the medieval German nun and writer Hrotsvitha called Islamic Córdoba “the ornament of the world”.

By 1600, however, the Islamic world had fallen behind western Europe, and for centuries the Middle East has been beset by slow growth, persistent poverty and seemingly intractable social problems. North-western Europe, by contrast, became the richest corner of the world, the hub of industrialisation and globalisation. In this sweeping and provocative book, the economic historian Jared Rubin asks how such a dramatic reversal of fortunes came about.

Rubin has no time for those who see the answer in any supposed “backwardness” of the Muslim faith. The successes of medieval Islam alone show that there is nothing against progress in its religious doctrine: “The superiority of the learned man over the devout is like that of the moon over the rest of the stars,” states one of Muhammad’s hadiths. Instead, Rubin argues that differences in the way religion and government interact caused the economic fortunes of Europe and the Middle East to diverge.

The driving motivation of most rulers is not ideology or to do good, but to maintain and strengthen their hold on power: “to propagate their rule”. This requires “coercion” – the ability to enforce power – and, crucially, some form of “legitimacy”. In the medieval world, both Islamic and Christian rulers claimed part of their legitimacy from religious authorities, but after the Reformation, Rubin thinks that European governments had to turn away from religion as a source of political legitimacy.

By getting “religion out of politics”, Europe made space at the political “bargaining table” for economic interests, creating a virtuous cycle of “pro-growth” policy-making. Islamic rulers, by contrast, continued to rely on religious legitimation and economic interests were mostly excluded from politics, leading to governance that focused on the narrow interests of sultans, and the conservative religious and military elites who backed them.

The source of Europe’s success, then, lies in the Reformation, a revolution in ideas and authority spread by what Martin Luther called “God’s highest and ultimate gift of grace”: the printing press. Yet even though printers quickly discovered how to adapt movable type to Arabic lettering, there were almost no presses in the Middle East for nearly 300 years after Gutenberg’s invention. Conservative Islamic clerics did not want the press to undermine their power, and the state – still tied to religion not commerce – had no incentive to overrule them. Not until 1727 did the Ottoman state permit printing in Arabic script, with a decree that the device would finally be “unveiled like a bride and will not again be hidden”. The prohibition was “one of the great missed opportunities of economic and technological history”, a vivid example of the dead hand of religious conservatism.

By contrast, Europe was revolutionised. Rubin argues that the Dutch revolt against Catholic Spain and the English crown’s “search for alternative sources of legitimacy” after breaking with Rome empowered the Dutch and English parliaments: by the 1600s both countries were ruled by parliamentary governments that included economic elites. Their policies – such as promoting trade and protecting property rights – were conducive to broader economic progress. Decoupling religion from politics had created space for “pro-commerce” interests.

Answering long-term questions requires both Rubin’s big picture macro-history and his awareness that even small events can set history’s direction and create “path dependencies”. But zoom out too far and the big picture can blur. Many developments affected who got a seat at the table, from changes in wealth generation to the impact of imperialism, and there was a lot more to English and Dutch success than institutional change, not least innovation in science and technology. Most important, Europe’s long reformations were more a maze than a path. As Rubin notes, “getting religion (mostly) out of politics took centuries” – centuries of radical social upheaval and destructive warfare. He argues persuasively for the importance of both religion and secularisation in economic history, but religious change affected not just politics but culture and ideas.

Early in the 20th century, Max Weber noted that many regions that had done well economically were Protestant, while some Catholic regions lagged behind. Rubin thinks Weber’s explanation – a Protestant “spirit of capitalism” – was unquestionably wrong, but that the pattern he spotted was correct. Not all recent economic analyses agree that Protestant cities did better than Catholic ones, but one Catholic region that certainly did lag behind was Spain. Early modern Europe’s first superpower grew persistently slowly after the 16th century, and Rubin shows that poor governance from a Spanish crown that ignored the country’s pro-commercial interests was often to blame. Imperial overreach, overreliance on colonial treasure, and myopic policymaking all inhibited development.

But were Spain’s struggles really due to the continued power of religion? The Spanish inquisition was not purely, as Rubin characterises it, a “costly” concession to the church in return for legitimation, but a state institution of social control; and Spanish kings did not involve themselves in endless European warfare purely to “protect the church’s interests”. State and religious interests were not so easily separable, and Spain had other problems too, including a regional fragmentation that lingers today.

In the Middle East the powers of state and religion were fused by Ottoman sultans intent on legitimising their rule and expansion through Islam. Unity that had been a medieval advantage became an early modern hindrance: with no political need to negotiate with economic interests, the Ottomans failed to pursue modernising reforms in finance, currency and law. It was not until the 19th century, with the region far behind the west, that liberal reform came, and its advance was swiftly checked by authoritarianism, religious conservatism and colonialism.

Rubin explains economic complexity with clarity and concision, and though it amounts to only a single piece of the divergence puzzle, his key argument – that “it matters who propagates political rule” – is indeed central to the Middle East’s struggles past and present. The relationship between religion and political power remains one of the region’s thorniest problems, one with no easy answers: history, Rubin writes, “gives us reason to be both pessimistic and optimistic”.

• Rulers, Religion and Riches: Why the West Got Rich and the Middle East Did Not is published by Cambridge University Press.