A new study shows that when it comes to the classroom, girls rule.

They outperform boys in math, science and reading in 70 percent of the 70-plus countries and regions surveyed by the Organization for Economic Development Cooperation and Development. Girls do better even in countries that rank low on U.N.'s gender equality index and that tend to discriminate against women politically, economically and socially — like Qatar, Jordan and the United Arab Emirates.

"What we find is that throughout the world boys are lagging in overall achievement," says psychologist David Geary at University of Missouri-Columbia, who coauthored the study. He adds that while there are several efforts to promote education for girls in the fields of science, technology, engineering and math, boys have largely been overlooked.

To draw their conclusions, Geary and fellow researcher Gijsbert Stoet at University of Glasgow sifted through the scores of 1.5 million 15-year-olds who took the Program for International Assessment between 2000 and 2009. The OECD gives the test every three years to measure the competency of 15-year-olds in those school subjects. That's the age when kids in many countries are completing their mandatory schooling, says Geary.

For the most part, boys do worse than girls, and the gap widens among the lowest performing students. Boys are on par with girls only in the top 20 percent of students in wealthy and developed countries. Boys tend to do better than girls in only three countries and regions: Colombia, Costa Rica and the Indian state of Himachal Pradesh. But Geary says that's too small a sample to come up with definitive conclusions about why these boys are A students.

The results were published last week in the journal Intelligence.

Why do boys fall behind? There could be many reasons, Geary says, like the structure of a school day. "It's tough for all kids to sit down and pay attention for six, seven hours but it's generally harder for boys," he says. "Boys are a little bit more active behaviorally and so sitting still requires a little more effort." Integrating recess or physical education into the school day might help them pay better attention in class. That's something that isn't emphasized in many schools in low-income countries.

And boys don't always stick with school. "In middle-income countries like Brazil, a lot of boys drop out at middle school level to go into the work force," says Changu Mannathoko, senior education adviser at UNICEF. "With boys, they get much more prestige when they are out working [or] part of a gang than being a student." Whereas girls see learning as an opportunity to get jobs and leave an oppressive environment, she adds, so they often take school more seriously.

So how do you help boys do better?

One simple intervention, says Mannathoko, is to encourage more men to become teachers in primary school so boys can have a role model early on.

A more enterprising solution is bringing school to the boys. In Lesotho, boys (and also girls) often can't get to school because they're up in the mountains herding livestock or working in mines. "The interventions weren't just focused on formal education but also on mobile schools." The idea is to bring the classroom to the children where they are working. Mannathoko acknowledges that Lesotho still grapples with providing education for kids, but she says the campaign is a good first step.

Meanwhile, there are concerns about the education of girls, despite the study's encouraging results. One of the problems of the study, Mannathoko says, is that it includes only a handful low-income countries. She notes that in many of the poorest nations, gender discrimination keeps millions of girls from getting an education in the first place. Many of them are at risk of being attacked while going to school or have to drop out and take care of the house.

So in the end, it's not really a matter of who needs more help, boys or girls.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.