Take that Elon Musk! Boeing will beat SpaceX to Mars, CEO Dennis Muilenburg told CNBC.

Musk has made it clear that sending humans to Mars is one of his primary goals, even saying it is the reason he started SpaceX in the first place.

But Boeing is in the final assembly stages of building a rocket called the Space Launch System with NASA, and the company will be the first to bring humans to the red planet, Muilenberg told "Mad Money" host Jim Cramer in an exclusive interview.

Boeing expects to have the system ready for a test flight in 2019.

"Eventually we are going to go to Mars, and I firmly believe that the first person that sets foot on Mars will get there in a Boeing rocket," he said.

SpaceX was not immediately available for comment.

Musk unveiled plans for a massive SpaceX rocket and spacecraft system called the "BFR" in September. It will ultimately replace all of SpaceX's current lineup, and will be used for space exploration and for rapid transport around Earth.

"I feel fairly confident we can build the ship and be ready for the launch in five years," Musk said during his presentation at the International Astronautical Congress in Australia in late September. "Five years seems like a long time for me."