CAPE CANAVERAL, Florida — An explosion rocked a SpaceX launch site Thursday during a routine rocket test, destroying the rocket and an Israeli communications satellite in its payload.

SpaceX was preparing for the launch of the unmanned Falcon 9 rocket when the blast occurred shortly after 9 a.m., according to NASA.

The test was in advance of a planned Saturday launch from Cape Canaveral Air Force Station, which is next to NASA’s Kennedy Space Center.

A SpaceX spokesman said an “anomaly” during a static fire test caused the loss of the rocket and the payload, the $200 million Amos-6 satellite, operated by Israeli firm Spacecom.

Per standard procedure, the pad was clear and there were no injuries,” SpaceX said in a statement.

It did not give a reason for the blast.

Buildings several miles away shook from the explosion, and multiple explosions continued for several minutes.

Dark smoke filled the overcast sky. A half-hour later, a black cloud hung low across the eastern horizon.

NASA — SpaceX’s major customer — said the explosion occurred at Launch Complex 40 at the Air Force station, and Kennedy emergency staff was on standby.

At the same time, personnel were monitoring the air for any toxic fumes.

Two NASA astronauts were conducting a spacewalk 250 miles up, outside the International Space Station, when the explosion occurred. Mission Control did not immediately advise them of the accident.

SpaceX is one of two companies shipping supplies to the space station for NASA. It’s also working on a crew capsule to ferry station US astronauts; that first flight was supposed to come as early as next year.

Amos-6 was intended to replace the aging Amos 2 communications satellite, launched in 2003.

In October, Spacecom signed a deal with Eutelsat Communications and social media giant Facebook to use the Amos-6 to provide coverage for large swaths of sub-Saharan Africa.

The explosion was the second major setback for Spacecom, which owns the Amos series of communications satellites.

The Amos 5, the fifth in a series of communications satellites launched by Spacecom, was lost in space in November, and has been spinning aimlessly since. The satellite was plagued with a series of faults since its launch from Kazakhstan in 2011.

The explosion is also setback for SpaceX. The California-based company, led by billionaire Elon Musk, had been ramping up with frequent launches to make up for a backlog created by a launch accident in June 2015. SpaceX was leasing the pad from the Air Force for its Falcon launches.

The company is also redoing a former shuttle pad at Kennedy for future manned flights for NASA.