OAKLAND — Making lemonade of California’s failed fight to regulate violent video games, Gov. Jerry Brown on Monday celebrated a pilot education program bankrolled by the same industry that defeated the state at the U.S. Supreme Court.

California had to fork over nearly $1 million to the video game industry for attorney fees after the nation’s highest court in 2011 sided with game makers in striking down a state law banning the sale of violent games to minors. Now the Entertainment Software Association is using some of that money to teach game design to Oakland students hoping to join the lucrative field.

“We had a good litigation. They won. They got lots of money. Let’s pour it into our schools and kids and particularly kids of color and kids of low income,” Brown said Monday afternoon on a visit to the Oakland School for the Arts.

“We want to be at the forefront of the electronic world,” he said.

The two-year “Project A-Game” program is teaching Oakland and Sacramento students how to code and create their own games and learn more about how they can find a career in the growing technical arts field. The industry is contributing $150,000. The nonprofit California Endowment is contributing another $300,000 with aims to expand the program, said Kathlyn Mead, the endowment’s vice president. Local game creators such as Zynga are also lending a hand.

The initiative has its roots in a failed bill to keep children away from violent video games. It was introduced by then-Assemblyman Leland Yee, D-San Francisco, signed in 2005 by Gov. Arnold Schwarzenegger and defended by Brown when he was attorney general. In a 7-2 ruling, the U.S. Supreme Court in 2011 declared it unconstitutional because it violated free speech.

Oakland young people ranging from their teens to early 20s are taking video game classes at Youth UpRising. The organization’s director, Olis Simmons, said she hopes the program will propel underserved kids into an industry that does not presently reflect the diversity of California’s population.

The classes will not likely lead directly to a job but “expose you to a whole labor market,” she said.

Speaking in front of boxing rings set up for a school play at the downtown Oakland charter school, several local students participating in the video game classes spoke with Brown about their projects.

Kordel Estep, 19, of Oakland, said he designed a game called “Kill Bears” through the program.

“I won’t ask what that’s about,” Brown said.

Contact Matt O’Brien at 510-208-6429 or follow him at Twitter.com/Mattoyeah.