Albert Einstein 's discovery of the gravitational field equations of general relativity and David Hilbert 's almost simultaneous derivation of the theory using an elegant variational principle, during a period when the two corresponded frequently, has led to numerous historical analyses of their interaction. The analyses came to be called a priority dispute.