Two young students from Newfoundland made such a good impression on Tesla and SpaceX founder Elon Musk during a recent internship that the tech magnate personally hired them to come work for his company.

Mark Comeau and Matthew Lane studied engineering at the College of the North Atlantic and Memorial University of Newfoundland in St. John's respectively, and landed work placements at Tesla, which makes electric vehicles, battery packs and solar panels.

N.L. interns hired by Elon Musk 8:20

After about a month moving back and forth between the Tesla Factory in California and the company's Gigafactory 1 in Nevada, the two finally saw an opportunity to do something they weren't necessarily assigned to be involved with, but which started them down the path to working with the company.

Elon Musk, CEO of Tesla Motors Inc., left, discusses the company's Gigafactory on Tuesday, July 26, 2016. (Rich Pedroncelli/Associated Press)

During the internship, Lane and Comeau saw a problem with the gating system on one of the production ramps at Gigafactory 1 and thought they might be able to do something about it.

"Essentially what happened is we saw an opportunity to solve the problem, we came up with our own idea and actually sort of crashed the meeting with Elon ourselves and presented the idea," Lane told CBC Radio's St. John's Morning Show.

Tesla Inc. designs and manufactures electric vehicles, charging stations, battery packs and more. (Sam Mircovich/Reuters)

Six weeks later, the two Newfoundland students' solution was brought online, and it must have impressed Musk and others at Tesla because both were asked to come back and start work on something else.

"Literally at like 10 a.m. Monday the week we finished, we got a message saying, 'Hey, head to Nevada to Gigafactory," Comeau said. "[A] five hour car drive later, we arrived in Nevada with a whole new situation and problems to address."

The Tesla Gigafactory is shown under construction outside Reno, Nevada May 9, 2015. (James Glover II/Reuters)

Tesla's Gigafactory in the Nevada desert is where the company manufactures batteries that go in Tesla vehicles. Lane and Comeau were put to work on solving a reliability issue with one of the systems they'd previously worked on.

Meeting Musk, getting hired

After they successfully solved their new problem, Musk personally approached the two students and offered them a job as professional problem solvers, helping to overcome issues at the factory.

Tesla Motors Inc. CEO Elon Musk speaks at the unveiling of the Model 3 at the Tesla Motors design studio in Hawthorne, Calif. (Justin Pritchard/Associated Press)

Comeau will start work immediately with Tesla, while Lane will finish up the summer semester at MUN before heading to the U.S. to get to work.

"Within two days we had solved this issue and got to speak to Elon himself, and this is kind of where he said, 'You guys did a good job, and you should stay,'" said Lane.

"It was probably one of the most unnerving experiences ever. Here's the CEO of a company and we're just two young interns, and he was like basically, 'Yup, you guys have to stay,'" added Comeau.