She wasn’t trying to break down gender barriers.

Analyn Haynes merely wanted her fifth- through eighth-grade students at Hanahan Middle School to have fun while honing their math skills, so she introduced them to an online gaming program called DimensionU with the intention of choosing the top four students as the school’s representatives in the program’s nationwide competition.

Haynes watched her students’ progress and dedication as they practiced before, during and after school on DimensionU’s educational games Velocity, TowerStorm and Melt Down.

Four sixth-grade girls soon rose above their peers.

“These girls were consistent in coming every time, and I watched as their scores went up,” said Haynes, a Gateway to Technology teacher wrapping up her 11th year at the school. “I didn’t set out to form an all-girls team. It just happened. These four girls are phenomenal.”

Trinity McDavid, Brianna Bussell, Evie Inman and Michelle Clark became last month the first all-girl team to win the Department of Defense Math Games, a live, virtual setting-competition of finalists from a field that originally included more than 1,000 teams, many of them with seventh- and eighth-graders. This is the program's fifth year.

“It kind of aggravates me whenever people say, ‘Oh a girl shouldn’t like math’ or 'That’s really weird. Why do you like that?’” said Trinity, 11. “I’m like, I just like it.”

Teammate Michelle, 12, thinks it’s no big deal.

“In a growing world of tolerance and diversity and acceptance, a girl can like math and a boy can like whatever he wants to like,” she said. “Just because you’re a girl doesn’t mean it’s going to be a big deal that you like math.”

That’s music to the ears of people like College of Charleston math instructor Kate Owens.

“This is fantastic,” she said of the preteens' accomplishment. “I think that we are definitely seeing a higher interest in not just mathematics but across all of the STEM — Science, Technology, Engineering and Math — disciplines among women at a lot of different levels, including high school and middle school age, and as a woman in mathematics I’m excited to see what the future holds.”

As they readied themselves for the DimensionU competition, the girls soon found that the math — typically seventh- and eighth-grade work — was the easy part.

“You have to be able to do math, but you also have to be able to control yourself in the video game in order to score points,” Michelle said. “I never touched a game console outside of school.”

The challenges are not only about getting the answer right but also about being fast at navigation. The teammates quickly learned how to push the right buttons to run, jump and gather rewards to get them farther in the action adventure missions.

“We all have different strengths, which I think really helps us at competing because if one person’s good at this game and another person’s good at that game, then we’ll have someone doing well in each game,” said Evie, 11.

They practiced so much that they memorized some of the questions, said Brianna, 12.

“They were able to talk to each other during the competition,” Haynes said. “I would hear them talking to each other and encouraging each other.”

To qualify for the DoD competition, the team first had to place in a challenge against teams from the Lowcountry.

“At that competition, in the game that they played to get to the semifinal, they scored 5,000 points and everybody else scored 1,000 points,” Haynes said. “Those boys were telling them that they cheated, there was no way they scored 5,000 points, so it was a good motivation for them. They wanted to go out there and show them that they did too earn 5,000 points.”

The girls represented the Navy in the program, held April 19 at Joint Base Charleston, and they competed against teams representing the Army and Air Force.

“Trying to win for the Navy was a lot different than just trying to win for us,” Evie said.

As individuals, the team members also accounted for six of the top 10 scores on two different games. They were ranked first, second and third on Velocity.

“I try to make sure that the girls that are in my class are proud of their brains,” Haynes said. “’Use your noggin’ is what I say — and be proud of it.”

That kind of encouragement is important because gender gaps in math achievement start as early as kindergarten, according to a 2016 study by the American Educational Research Association.

The study also found that teachers consistently underrated girls’ math skills.

Among the reasons given for the disparity are “math anxiety” in girls, the fact that girls are more likely to choose professions where they work with people, and because girls also score high in reading, giving them more options, according to a 2016 paper on the topic by University of Illinois Mathematics Education Professor Sarah Lubienski.

“I think the interest among women was always there, but now more women are being told earlier that they can make a career in mathematics,” said Owens, the math professor. “There are more role models and they’re getting more support. The interest among women was always there, but maybe now the difference is the social support.”

Three of the four members of Hanahan’s team — Trinity plans to go into photography — hope to pursue careers in engineering. Evie even has it planned out to an undergraduate in aerospace engineering from MIT, master’s degree from Harvard and a career in the industry in Florida.

But for now, “I don’t raise my hand that often in math because Trinity does that,” she said.

“Because I love it so much,” Trinity adds quickly.

Reach Brenda Rindge at 843-937-5713. Follow her on Twitter @brindge.