Updated

SpaceX launched its latest prototype rocket Wednesday and reached its highest altitude to date, but the test flight ended in a massive fireball when the spacecraft attempted to land. 

The futuristic Starship SN8 launched from SpaceX’s facility in Boca Chica, Texas into a clear blue sky, soaring eight miles in the air over the Gulf of Mexico. 

After skimming the stratosphere, the Starship returned to the earth's surface, exploding as it hit the ground. 

"Low pressure in the fuel header tank during the landing burn led to high touchdown velocity resulting in a hard (and exciting!) landing," SpaceX explained on the company's website

SPACEX DRAGON 2 CARGO SHIP DOCKS ON INTERNATIONAL SPACE STATION

Despite the explosion, SpaceX CEO Elon Musk said the unmanned test flight was a success and his team got all the data it needed. 

"Successful ascent, switchover to header tanks & precise flap control to landing point," Musk tweeted, adding that South Texas "is the gateway to Mars."

Musk had downplayed the likelihood of complete success going into the test flight, saying last month that the chances of the Starship landing in one piece were only "1/3."

The Starship is a reusable transportation system that SpaceX hopes will someday carry the first humans to Mars. 

CLICK HERE FOR THE FOX NEWS APP

Two prior test flights of the space vehicle earlier this year were successful, though both attained much lower altitudes. 

No one was injured in the crash.

The Associated Press contributed to this report.