An arrival time difference method utilizing refracted arrivals from earthquakes in a homogeneous, layered earth model has been developed for the simultaneous determination of near-source (in situ) velocity and relative locations of earthquakes. The method is particularly applicable when analyzing data from arrays in which most of the recording stations are far (i.e., several focal depths) from a group of events. This iterative scheme locates earthquakes relative to a master event and performs an inversion for in situ velocity using a generalized inverseleast squares estimation procedure. Direct arrivals, when available, may be included to stabilize the inversion and increase the accuracy of the event locations. We tested this scheme on artificial data contaminated by random and systematic arrival time errors, gaps in azimuthal coverage, and inaccuracies in the assumed velocity model. As usual, depth is the least well-resolved hypocenter coordinate, but this scheme yielded accurate locations of most events while converging to the correct velocity model.