A deal to extend record OPEC+ output cuts was going smoothly — until Saudi Arabia and Russia discovered just how much some of their allies had been cheating.

In private conversations, Saudi Arabia Energy Minister Prince Abdulaziz bin Salman and his Russian counterpart Alexander Novak had agreed with little fanfare on May 28 to extend oil production cuts by one more month. Their bosses had spoken the day before. With the two power players aligned, Prince Abdulaziz suggested bringing the meeting with other OPEC ministers forward, and Novak had no objection.

When, a day later, the trouble started. The first OPEC output surveys, compiled by news organizations and consultants, showed that Angola, Iraq, Kazakhstan and Nigeria weren’t squeezing supply nearly as much as they had promised. Baghdad was the worst offender.Cheating is as old as the OPEC system of production quotas, which goes back to the mid-1980s. Academics call it the “free rider” problem: Someone benefits from everyone else’s effort without contributing. In OPEC, ministers call it the “Pinocchio” problem.

Saudi Arabia had long urged other members to share the burden more equitably. Russia, a long-term laggard that has now converted to strict compliance, joined the Saudis in their push. It was as if the brief but vicious price war of earlier this year had never happened.

“All in all, mission accomplished,” said Harry Tchilinguirian, head of commodity market strategy at BNP Paribas SA. “But it would not have happened without Saudi Arabia and Russia coming together and singing from the same song sheet ahead of the meeting.”