Reciprocity stabilizes cooperation from the level of microbes all the way up to humans interacting in small groups, but does reciprocity also underlie stable cooperation between larger human agglomerations, such as nation states? Famously, evolutionary models show that reciprocity could emerge as a widespread strategy for achieving international cooperation. However, existing studies have only detected reciprocity-driven cooperation in a small number of country pairs. We apply a new method for detecting mutual influence in dynamical systems to a new large-scale data set that records state interactions with high temporal resolution. Doing so, we detect reciprocity between many country pairs in the international system and find that these reciprocating country pairs exhibit qualitatively different cooperative dynamics when compared to nonreciprocating pairs. Consistent with evolutionary theories of cooperation, reciprocating country pairs exhibit higher levels of stable cooperation and are more likely to punish instances of noncooperation. However, countries in reciprocity-based relationships are also quicker to forgive single acts of noncooperation by eventually returning to previous levels of mutual cooperation. By contrast, nonreciprocating pairs are more likely to exploit each other’s cooperation via higher rates of defection. Together, these findings provide the strongest evidence to date that reciprocity is a widespread mechanism for achieving international cooperation.