NEWBURYPORT — Building a two-meter boat and then programming it to sail on its own takes a great amount of engineering skill, patience and savvy. Entering a boat in an international robotics competition and besting colleges is another matter altogether. Not bad for a bunch of Newburyport High School students.

But that’s what happened last week when NHS engineering students entered Das Boot Kaput (Translation: The Broken Boat) and won the 13th annual International Robotics Sailing Regatta. Hosted by Worcester Polytechnic Institute, the event took place from June 3 to 7 at Lake Quinsigamond, situated between Worcester and Shrewsbury.

“It’s crazy” said Sarah Leadbeater, NHS technology and engineering instructor.

NHS was the only high school entry at the regatta with the remaining teams coming from colleges.

“I’m totally in shock. To go up against colleges like Virginia Tech, Cornell and WPI, it just feels incredible to be a high school team doing this,” Newburyport High School senior Mateo McDermott said.

To win the regatta, Das Boot Kaput had to excel in a series of challenges including precision navigation, endurance/long distance and carrying a payload. Each team was also required to present their crafts to a panel of experts and discuss control theory, system engineering and naval architecture.

For five previous years, NHS students had taken part in the regatta but never came close to victory, Leadbeater said.

“Usually we’re terrible, but everything came together,”” she said, calling the regatta essentially a college competition.

The key to victory was making improvements on the same boat students built two years ago. One of the improvements was adding two outriggers to improve buoyancy and raise the boat’s waterline.

That helped keep the boat from flipping over and protecting vital electronics so the boat could sail longer.

“They spent two years solving all their mechanical problems and they came together, everything came together. It’s amazing. I’m still in a little bit of shock about this,” Leadbeater said.

The seeds to NHS’s success were sown seven years ago when the Newbury Education Foundation bought a meter-long radio controlled boat for Leadbeater’s department. From there, students spent countless hours after school making improvement upon improvement.

The prize for winning is the chance to host next year’s regatta.

And seeing that McDermott has already committed to attending Virginia Tech in the fall, there’s a good chance he’ll be coming back to Newburyport to compete against his former high school.

“It would be so funny,” McDermott said.

McDermott called his time in Leadbeater’s after school program a learning experience. Since joining, he’s learned 3D printing, CAD modeling and other engineering skills.

“I’ve learned so much being in this program,” McDermott said.

Staff writer Dave Rogers can be reached by email at drogers@newburyportnews.com. Follow him on Twitter @drogers41008.