Blockchains are distributed ledgers, operated within peer-to-peer networks. If reliable and stable, they could offer a new, cost effective, way to record transactions and asset ownership, but are they? We model the blockchain as a stochastic game and analyse the equilibrium strategies of rational, strategic miners. We show that mining the longest chain is a Markov perfect equilibrium, without forking on the equilibrium path, in line with the seminal vision of Nakamoto (2008). We also clarify, however, that the blockchain game is a coordination game, which opens the scope for multiple equilibria. We show there exist equilibria with forks, leading to orphaned blocks and also possibly to persistent divergence between different chains.