We are concerned with the inverse problem for an eikonal equation of determining the speed function using observations of the arrival time on a ?xed surface. This is formulated as an optimisation problem for a quadratic functional with the state equation being the eikonal equation coupled to the so-called Soner boundary condition. The state equation is discretised by a suitable ?nite difference scheme for which we obtain existence, uniqueness and an error bound. We set up an approximate optimisation problem and show that a subsequence of the discrete mimina converges to a solution of the continuous optimisation problem as the mesh size goes to zero. The derivative of the discrete functional is calculated with the help of an adjoint equation which can be solved ef?ciently by using fast marching techniques. Finally we describe some numerical results.