During a childhood visit to the National Air and Space Museum in Washington, D.C., Margaret Anderson caught the space-travel bug. She knew then and there she wanted to work for NASA.

It wasn’t just a passing fancy. Now 21, Anderson is a student at the Rochester Institute of Technology, working simultaneously on her master’s and bachelor’s degrees in mechanical engineering. And she’s living her dream. Anderson is employed at the space agency through a student co-op program and is working on hybrid rockets—experimental power plants that combine solid and liquid fuel technologies to find a cheaper, safer way into space.

If it sounds counterintuitive that a fledgling rocket scientist is earning degrees in mechanical engineering, it seemed that way to Anderson at first. She admits she was initially “disappointed” that RIT has made aerospace engineering part of its mechanical engineering program. Now, though, she’s “really glad I decided to do it.” Mechanical engineering, she says, has given her a wider understanding of engineering, and that has helped her grapple with the myriad issues involved in rocket technology.

Rocket science. Mechanical engineering is all about designing, building, and maintaining machines of all types and sizes. It’s an engineering classic, dating to the early days of the industrial revolution, when engineering know-how was needed to harness the potential of the steam engine. But despite its 19th-century pedigree, M.E. is today at the heart of many cutting-edge technologies.

That makes it a hot choice for students. It’s by far the most popular undergraduate degree in engineering; according to the American Society for Engineering Education, 16,063 undergrad degrees were awarded in 2015. At the graduate level, it’s the third-most-popular discipline among engineering master’s and is back in first place among doctorates.

Why the demand? M.E. students have to master key elements of chemical, civil, and electrical engineering, as well as physics and advanced mathematics, particularly calculus. “The breadth of mechanical engineering is unique,” explains Larry Silverberg, the associate head of the mechanical and aerospace engineering program at North Carolina State University. “And, no question, that’s a selling point.”

That’s particularly true for M.E. students who go to graduate school, with its focus on a narrow area of study. The broadness of the degree means they have a wide array of possibilities to choose from. Traditionally, many mechanical engineers headed for automotive and aerospace, but energy, robotics, and bioengineering are growth areas, too, as is nanotechnology—which is, after all, the manipulation of particles at the nano-level to build microsize machines.

Silverberg singles out three sectors critical to America’s future: energy, security and defense, and healthcare. “Mechanical engineering plays a big role in all three of those,” he says.

Ewan Pritchard, who is completing his Ph.D. in mechanical engineering at North Carolina State, is head of the hybrid program at Advanced Energy, a company that recently unveiled the first commercially available plug-in hybrid vehicle, a school bus. He’s passionate about developing alternative-fuel vehicles, which is why M.E. was his choice.

“The coming decade is going to be the decade of energy, and when you think energy, you think mechanical engineering,” says Pritchard, 35. That’s because, as Iowa State University M.E. Prof. Robert C. Brown explains, mechanical engineers are not only experts in thermodynamics—the study and uses of energy—they know how to apply its laws to bring machines to life.