This spring, I went to the Middle East to try to understand why girls are doing so much better in school, despite living in quintessentially patriarchal societies. Or, put another way, why boys are doing so badly.

It’s part of a pattern that is creeping across the globe: Wherever girls have access to school, they seem to eventually do better than boys. In 2015, teenage girls outperformed boys on a sophisticated reading test in 69 countries—every place in which the test was administered. In America, girls are more likely to take Advanced Placement tests, to graduate from high school, and to go to college, and women continue their education over a year longer than men. These are all glaring disparities in a world that values higher-order skills more than ever before. Natasha Ridge, the executive director of the Sheikh Saud bin Saqr Al Qasimi Foundation for Policy Research in the United Arab Emirates, has studied gender and education around the world. In the United Kingdom and the United States, Ridge believes she can draw a dotted line between the failure of boys to thrive in school and votes for Brexit and for Donald Trump. Disengaged boys grow up to become disillusioned men, Ridge says, left out of the progress they see around them.