The average cost of borrowing on international financial markets varies widely from nation to nation even after controlling for the varying levels of indebtedness of their governments. This suggests that markets assign country specific default risk assessments. In this paper we focus on one natural source of this difference -the quality of their institutions. We begin by showing that the average sovereign spread is positively related to the average percentage of a government contract that must be given as a "gift" in order to secure the contract. We then build a sovereign default model where the government is constrained to use corrupt bureaucrats to deliver public goods and services and manage its accounts. Using the gift data as a measure of the public resources diverted by bureaucrats, and the Rule of Law index as a measure of institutional quality, we estimate the diversion policy of bureaucrats and use it to calibrate our model to international data. We use the model to generate an artificial international data set where countries vary only in the institutional quality parameter. Running the same regressions on our artificial data, we find that average spreads are positively associated with the bribe (gift) rate and with average debt levels. The model implies that when revenue streams are low, a benefit of default is that public services net of bureaucratic diversion actually increase. Since the net gain in public services obtained by defaulting is decreasing in the level of institutional quality, international lenders assign lower default risk to those countries.