SpaceX has successfully launched and landed a recycled Falcon 9 rocket for the second time. The rocket’s first stage — the 14-story-tall core that houses the fuel and the rocket’s main engines — touched down on one of the company’s autonomous drone ships in the Atlantic Ocean shortly after taking off from a launchpad at nearby Cape Canaveral, Florida. It’s the 12th time SpaceX has successfully landed one of these rocket stages out of 17 attempts, and the seventh time it’s performed the feat at sea.

This particular rocket previously flew in January, when it was used to put 10 satellites into orbit for communications company Iridium. The rocket then landed on a drone ship in the Pacific Ocean. SpaceX retrieved the rocket and spent the next few months refurbishing it in preparation for today’s launch. This afternoon, it was used to launch Bulgaria’s first communications satellite for TV service provider Bulsatcom.

Elon Musk had warned that the rocket might not make it back

The landing wasn’t easy, though. Because the rocket had to push BulgariaSat-1 to such a high orbit, the first stage experienced more force and heat during reentry than any other Falcon 9, according to a tweet from SpaceX CEO Elon Musk. Musk even warned that there was a “good chance [the] rocket booster doesn't make it back.”

Shortly after the landing, though, Musk returned to Twitter to add that the rocket booster used “almost all of the emergency crush core,” which helps soften the landing. It was the first time SpaceX has landed one rocket on both of its drone ships. (SpaceX keeps one in California for launches from Vandenberg Air Force Base.)

Rocket is extra toasty and hit the deck hard (used almost all of the emergency crush core), but otherwise good — Elon Musk (@elonmusk) June 23, 2017

Being able to reuse parts of the Falcon 9 rocket has long been a goal for Musk. He’s been trying to get the company to a point where it can reuse things like the rocket’s main stage, or the payload fairing (the cone at the top), instead of building a new rocket for each new launch. Reusing rockets is a great way to bring down launch costs; previously, they were discarded after each launch, and building them from scratch costs millions of dollars.

To that end, SpaceX launched and landed a reused Falcon 9 for the first time back in March, and it also recovered that rocket’s fairing — a first for the company. Then, earlier this month, SpaceX sent a used Dragon cargo capsule back to space for the first time ever.

But it’s the company’s strides towards sticking these rocket landings that finally made this all possible. While many of its early landing attempts were met with fiery ends, SpaceX hasn’t lost a rocket in a landing attempt since early last summer. With today’s success, the company has now landed eight rockets in a row dating back to that June explosion, save for a few launches where there wasn’t enough leftover fuel for a landing attempt.