In grappling with the threat of doomsday rocks from outer space, Hollywood has always been far ahead of the federal government, cranking out thrillers full of swashbuckling heroes, rockets and nuclear blasts that save the planet.

Now Washington is catching up.

On Wednesday, the nation’s agencies that build civilian rockets and nuclear arms sealed an agreement to start working together on planetary defense.