Photo/Illutration Pepper watch the live broadcast of the SpaceIL spacecraft as it lost contact with Earth in Netanya on April 11, 2019. (AP Photo)

YEHUD, Israel-- An Israeli spacecraft crashed into the moon Thursday just moments before touchdown, failing in an ambitious attempt to make history as the first privately funded lunar mission.

The Beresheet spacecraft lost communication with ground control as it was making its final descent. Moments later, the mission was declared a failure.

"We definitely crashed on the surface of the moon," said Opher Doron, general manager of the space division of Israel Aerospace Industries. He said the spacecraft was in pieces scattered at the planned landing site.

Doron said the spacecraft's engine turned off shortly before landing, and scientists were still trying to figure out the cause of the failure.

He nonetheless called the mission an "amazing success," for reaching the moon and coming so close to landing successfully. "It is by far the smallest, cheapest spacecraft ever to get to the moon," he said.

The mishap occurred in front of a packed audience that included Prime Minister Benjamin Netanyahu and was broadcast live on national television.

It had been hoped that the small robotic spacecraft, built by the nonprofit SpaceIL and state-owned Israel Aerospace Industries, would match a feat that has been achieved only by the national space agencies of three countries: U.S., Russia and China.

"We will try again," Netanyahu said. "We reached the moon, but we want to land more comfortably, and that is for the next time."

Around 20 minutes before the scheduled landing, engine firings slowed Beresheet's descent. Suspense gripped the control room.

Engineers watched in silence as Beresheet, its movements streamed live on dozens of screens, glided toward a free-fall.

But then the screens showed the engine misfiring, and the velocity surging as it headed toward the lunar surface. Radio signals from the spacecraft, the size of a washing machine, abruptly cut off, and nervous chatter erupted in the control room.

Standing before darkened computer screens, commanders declared the mission a failure. The craft crashed near the historic Apollo landing sites.

President Reuven Rivlin hosted dozens of youngsters at his official residence, one of several celebrations scheduled across the country. The children, some wearing white and blue spacesuits, appeared confused as the crash unfolded.

"We are full of admiration for the wonderful people who brought the spacecraft to the moon," Rivlin said. "True, not as we had hoped, but we will succeed in the end."

The failure was a disappointing ending to a 6.5 million kilometer (4 million mile) lunar voyage, almost unprecedented in length, that was designed to conserve fuel and reduce price.

The spacecraft hitched a ride on a SpaceX Falcon rocket launched from Florida in February.

For the past two months, Beresheet, which means "Genesis" or "In the Beginning," traveled around the Earth several times before entering lunar orbit.

Beresheet carried a small laser retroreflector from NASA intended to measure magnetic fields and provide insight on the moon's iron core. It also had a time capsule that included a Bible, Israeli cultural symbols and a picture of famed Israeli astronaut Ilan Ramon, who died in the crash of the U.S. space shuttle Columbia in 2003.

The head of NASA, Jim Bridenstine, said he regretted the mission didn't succeed, but "I have no doubt that Israel and SpaceIL will continue to explore and I look forward to celebrating their future achievements."

The Google Lunar X Prize Competition, which offered $20 million for the first privately funded venture to make it to the moon, is what first drove SpaceIL to get Beresheet off the ground.

Beresheet made the final cut, but after several deadline extensions, the competition ended last year without a winner.

SpaceIL pressed on with its dream, convinced the mission would help inspire Israel's next generation to study science and engineering. The $100 million mission was financed largely by Israeli billionaire Morris Kahn and a handful of other investors.

"The second I heard their dream, I wanted to support it," said Kahn. "I knew it would give us in Israel a sense of pride."

The XPrize Foundation congratulated the SpaceIL team despite the failed landing.

"No matter what actually happened, what SpaceIL is doing here achieves our whole vision. There's no question this is a global news story that still inspires and guides future innovators and entrepreneurial startups," said Peter Diamandis, XPrize founder. "We're extraordinarily proud they made it this far."

Spacecraft crash more on other planets than they do on the moon, but the moon has had seen failed missions previously, said American University professor Howard McCurdy, who has written several books about space.

In the 1960s before the Apollo lunar landings, NASA sent seven unmanned Surveyor flights to the moon and two failed, he said.

"What makes it hard is the conditions — the geological and atmospheric conditions are different on the moon and the planets than they are on Earth," McCurdy said. "It makes it really hard to test" the spacecraft's landing back on Earth.

McCurdy said nearly 50 years ago Neil Armstrong had to fly eight kilometers (five miles) before landing to avoid hitting a rock and had to deal with a malfunctioning radar altimeter.

Phil Larson of the University of Colorado, who was a space adviser in the Obama White House, said the Israeli effort underlines that "space is still extremely hard, and landing human made objects on other worlds is an utmost challenge."

But, he added, "While it failed to land successfully, overall it was a path-breaking and innovative project."