Defense Secretary Leon Panetta explains some clocks featuring global times at the Pentagon on March 20 as students from Agnor-Hurt elementary school in Charlottesville look on. (Erin A. Kirk-Cuomo/OASD/PA)

The secretary of defense had to end his 11:30 meeting abruptly when he was called to the White House. His guests didn’t mind — they liked seeing all the men with walkie-talkies swoop in to usher Leon E. Panetta out. Awesome! Besides, they wanted to play with the coins he had given them.

It’s not every 9-year-old who gets invited to talk with some of the world’s most powerful people. But this class of Charlottesville fourth-graders has read Sun Tzu’s “The Art of War,” learned to avoid battles by outthinking their opponents, and negotiated simulated crises involving arms dealers, oil spills and insurgents.

They also solved global warming. In a week.

The class is led by a charismatic longtime teacher whose past led him to think in unexpected ways. He was one of a handful of children chosen to integrate an all-white Virginia school, then wandered through Asia studying religion and philosophy before devising a game to teach kids how to solve problems. “They are learning to decrease suffering in the world,” John Hunter said, “and increase compassion.”

Suddenly, people from Harvard to the United Nations are listening. And that includes Panetta, who said recently that the United States was within an inch of war almost every day in the area around North Korea.

Whether the Pentagon invitation was an innovative way to bring inspiration to a stolid institution or an odd play by officials mired in endless warfare, the kids in the class are pretty sure of one thing: The class got the officials thinking.

“The impact was really profound on us here at the Pentagon,” said Beth Flores, director of the Leadership and Organizational Development Office of the under secretary of defense for policy.

This odd partnership — military leaders and young kids learning from one another — started with a game that Hunter’s Agnor-Hurt Elementary School students play: the World Peace Game. The children work to solve thorny problems erupting around the map. Everyone has to win for the game to be won.

Inspired by Gandhian principles, the game aims to get players to build harmony while accepting the reality of violence, Hunter said. He talks about fostering the Buddhist concept of “emptiness,” the space and serenity to think deeply about complex issues.

Plus, he wants it to be fun.

The game has four countries with made-up names but real-world problems: cyberattacks, ballooning debt, ethnic tensions.

Hunter tells the students that he doesn’t know how to solve the problems, so they will have to figure out a way. Their collective wisdom, he said, is much greater than his.

A summons to Washington

Over eight weeks, they play the game, small people carrying dossiers, negotiating deals, starting wars. When Hunter rings the bell to start the game, something between a hum and a roar fills the classroom as they argue and barter, pout, form alliances, cut deals and, sometimes, have a little temper tantrum.

Sarah Schmidt, who is 9, was chief financial officer of a large country, a diplomat and, secretly, a saboteur chosen by Hunter to undermine everything. No one suspected, she said, for the longest time. “Then I went quick. They got vicious when I tried to coup d’etat my prime minister.”

Some kids just want to blow everything up. But as they see the consequences ripple out after each battle, Hunter said, they begin to look for other options.

“I learned that you can’t win just by yourself,” Sarah said. “You have to depend on each other for what you need to do.”

Recently, the game has been getting a lot of attention. Chris Farina, an independent filmmaker in Charlottesville, produced a documentary that led to screenings and speeches by Hunter at universities and the annual TED conference. Flores invited Hunter and Farina to the Pentagon this past fall.

“They didn’t invite us to talk about war,” Hunter said, surprised. “They’re the greatest military machine in history. They wanted to seriously have a discussion about peace and how we do that.”

Hunter said Pentagon officials told the two: “We’ve been at war 10 years. We’re tired. We’re worn out. We’ve been through this with no end in sight.”

So one morning in March, the ministers of defense, the ethnic leaders, the arms dealers, the saboteur and all their friends took a bus to the Washington area to tell the Pentagon how they brought peace to the world.

The event was closed to the news media, a spokeswoman said at the time. But as with so many high-powered gatherings, firsthand accounts leaked out afterward.

The students were wowed by the size of the building, by the Sept. 11 memorial and by their tour guide, who not only walked backward while leading them down long hallways, but also walked backward down the escalator. They loved a story about the Soviets concluding from satellite surveillance that a small building at the center of the Pentagon was the site of a bunker full of nuclear missiles. It was actually a hot-dog stand.

Shortly before noon, the children sat down with Panetta for about half an hour. He asked them about the crises they had solved, they said, and how they had done it — especially climate change.

They had questions for him, too: Why do you have so many phones? (They’re all broken, they said he told them.) What’s that glass hammer on your desk? (Any time someone does something wrong, he whacks them on the head with it.) “That really cracked all of us up,” Sarah said.

Panetta gave them commemorative coins, a military tradition to honor someone. When he was called to the White House, they devoured pizzas, tossed the coins and stuck them in their eyes like monocles.

They had a mock news conference with Pentagon press secretary George Little, drilling him with questions such as whether America is ready to protect Taiwan at all costs against Chinese aggression.

They ended the day with a “hot wash,” the typical debriefing to discuss important take-aways.

‘Value of stepping back’

Samuel Knotts, a 10-year-old prime minister, said they were invited “to help get a whole new perspective of the world and how to solve problems. If somebody steals your lunchbox, you don’t go up and punch him in the face to get it back — you want to reason with them, find out why they took it or talk to a teacher. The teacher in that case would be the United Nations.”

“I think they learned a lot from the class,” he said. “You could see they were understanding and surprised by most of our ways to get through problems when we were talking about solving all the crises.”

Albemarle County Schools Superintendent Pamela Moran said officials seemed struck by the students’ insistence that they couldn’t solve problems in isolation and how “fierce” the students were when asking tough questions.

Flores said she thinks Pentagon officials learned “the value of stepping back from the constant rush of the inbox to think with a fresh perspective about world problems. I think they were reminded of their own personal commitment to public service.”

The visit was part of a transformation in the policy department to encourage continual learning, strategic thinking, new perspectives and inspiration through things such as talks by scholars or working in another agency for a year.

Flores said she and Hunter have talked about an ongoing partnership between his class and the Pentagon.

“Can we go back? Please?” Sarah and Aimee Straka, the 9-year-old head of the United Nations, asked Hunter recently.

“It’s a really fun place that we could explore more,” Sarah said.

“Long time, no see, Mr. Panetta!” Aimee called out, giggling.

“They may save us all,” Hunter said later. “I hope so.”