Using molecular dynamics we study the dependence of the friction force on the sliding speed when an elastic slab (block) is sliding on a rigid substrate with a surface height profile. The friction force is nearly velocity independent due to phonon emission at the closing and opening crack tips, where rapid atomic snap-in and -out events occur during sliding. The rapid events result from lattice trapping and are closely related to the velocity gap and hysteresis effects observed in model studies of crack propagation in solids. This indicates that the friction force is dominated by processes occurring at the edges of the contact area, which is confirmed by calculations showing that the friction force is independent of the normal force. The friction force increases drastically when the sliding velocity approaches the solid transverse sound velocity, as expected from the theory of cracks.