We determined a new one-dimensional P-wave velocity model for the territory of Hungary based on the first arrival times of local earthquakes. During the computations 910 P-wave arrival data of 86 events from the time period between 1985 and 2010 have been used. The applied methodology is a combination of a genetic algorithm based procedure and an iterative linearized joint inversion technique. The preferred velocity profile has been chosen from the best models based on the data of a series of controlled explosions.The resulting flat-layered model consists of three crustal layers and a half-space representing the uppermost mantle. The crustal compressional velocities vary in the range of 5.3-6.3 km/s, while the uppermost mantle velocity was found to be 7.9 km/s. The Moho is located at an average depth of 26 km.Additionally, the Vp/Vs ratio was calculated by the Wadati-method, which gave a value of 1.74±0.05.