The European Space Agency just secured 436 million euros to send its first-ever rover to Mars in 2020.

The news came as a relief to scientists behind the two-part ExoMars mission, who are still reeling after their spacecraft Schiaparelli crashed in an attempt to land on the Red Planet during the first part of the mission.

But a proposal to survey a near-Earth asteroid — and eventually attempt to knock it off course — was not so lucky.

Last month, more than 100 planetary scientists, engineers and physicists had signed an open letter in support of NASA and ESA's Asteroid Impact and Deflection Assessment mission, warning that humanity really needs to figure out whether we can deflect a killer asteroid before it crashes into Earth. But ESA Director General Jan Woerner said that the ESA part of the program didn't get enough backing or funding to ensure its future, although the space agency will continue to study asteroid defense in other ways.

“These asteroid activities, looking at how we can really defend our planet in case something is happening and Bruce Willis is not ready to do it a second time . . . will be continued,” he joked to Reuters, referencing the 1998 movie “Armageddon,” in which Willis plays a driller who must save Earth from an asteroid capable of causing a mass extinction.

The decision makes it even less likely that NASA will pursue its half of the mission, which would have sent a spacecraft slamming into the asteroid as ESA satellites observed the maneuver.

The funding decisions came out of a two-day meeting of government ministers in Lucerne, Switzerland. Europe approved an extra 339 million euros for the ExoMars rover, and ESA said it could cobble together an additional 97 million euros by reshuffling funds internally, according to Nature.

“After the many challenging, difficult and rewarding moments of 2016, this is a great relief and a fine result for European space exploration,” Don McCoy, ESA’s project manager for ExoMars, told Nature.

The first half of the mission, which is a joint project of ESA and the Russian Federal Space Agency, arrived at Mars this October. It included the Trace Gas Orbiter, which will circle above the planet sniffing for gases that could be signs of habitability or even life, and the Schiaparelli lander. The latter spacecraft was primarily designed to test the technologies needed for landing — and it failed.

An ESA investigation revealed that the lander misinterpreted sensor data during its descent, so it thought it was below ground level rather than two miles above it. Schiaparelli jettisoned its parachute, turned off its thrusters too early and went into a free fall before coming to a crashing halt on the Martian surface.

It was a sadly familiar scenario. Roughly half of all Mars missions fail, and ESA had already lost one lander to the deadly descent to the surface. Prospects for the rover mission, which is already over budget and delayed from its original launch date in 2018, looked uncertain after the Schiaparelli crash.

“Completion of ExoMars was probably the most challenging of our discussions because of the size of the additional resources that have been put on the table,” Roberto Battiston, president of the Italian Space Agency, told the BBC.

But European ministers decided to commit to the project anyway. Engineers say they learned important lessons from the crash that will help the 2020 robot land safely on the Red Planet, where it will drill beneath the surface in search of microbes that might survive beyond the reach of deadly radiation.

The ESA also committed to participating in the International Space Station until at least 2024.

Read more: