BAR HARBOR, Maine — Eight Connors Emerson Elementary School students recently returned to Bar Harbor from a three-day competition in California at which they were crowned the best of 74 teams from throughout North America after competing in a robotics competition sponsored by Lego.

The Denmark-based construction toy manufacturer stages such student competitions throughout the world. Last December the Connors Emerson team of sixth- through eighth-graders was named the best of 70 robotics teams in Maine, qualifying the students involved to travel to St. Louis to participate in Lego’s World Festival, which features the best of an estimated 20,000 teams worldwide.

This year the team and two coaches flew on May 16 to the three-day North American Open Championship Tournament at LegoLand in Carlsbad, Calif. That event allowed the students to demonstrate to panels of judges the design, construction and computer programming skills they applied to building an autonomous robot using Lego Mindstorm technology.

Lego sponsors such sportslike events to encourage students in developing teamwork, critical thinking and time management skills.

The Carlsbad competition included an event in which each team’s robot had 150 seconds to negotiate an obstacle course constructed on a four-by-eight-foot sheet of plywood.

“It’s sort of like a miniature golf course, with all sorts of obstacles and structures to maneuver through, each worth a number of points if successfully negotiated,” said Dave Gallup, one of the Bar Harbor team’s coaches. “These robots can be built with any Lego parts, and the solutions are endless, involving string, magnets, rubber bands and motors.”

Relying on months of programming and trial-and-error testing of the capabilities of an onboard computer, the Connors Emerson team’s robot ran the course three times.

“Their top two scores were the top scores of the competition out of 212 total runs by all the teams, and their worst score was good enough to come in second overall by itself,” Gallup said. “Their top score allowed them to win the robot performance award, which is the event that the students find the most fun. They also won second place in robot strategy and innovation and they were in the top 10 in the teamwork challenge.”

Gallup said he’s delighted and amazed by the time, effort and commitment the team brings to these Lego challenges.

“The season started in September, and the team had a competition in December against all the teams in Maine, receiving perfect scores in 29 of 30 categories and winning the table robot performance event,” he said. “That qualified them to go the California championship.”

Most weeks, Gallup said, the team practiced every day, weekends included.

“I’d estimate they had approximately 200 practices, comprising approximately 1,500 man- hours of work,” he said. “They probably dealt with the robot failing 5,000 times, so they really learned to deal with failure and how to problem-solve and debug. They never had a serious dispute or argument during the season, and they really got along well. And I think they learned, as Vince Lombardi once said, ‘It’s not whether you get knocked down. It’s whether you get back up.’”

The trip to California cost $14,000, with funding coming from seven sponsors. They included: AMC Technologies, LLC; Bar Harbor School Department; Fairchild Semiconductor Corp.; The Fitch Co.; The Jackson Laboratory; Machias Savings Bank; and Time Warner Cable.