last laugh

noun

1.
ultimate success achieved after a near failure (inspired by the saying ‘he laughs best who laughs last’)