SUMMARY The 26 May 2019 MW 8.0 Peru intraslab earthquake ruptured the subducting Nazca Plate where the dip angle of the slab increases sharply and the strike angle rotates clockwise from the epicentre to north. To obtain a detailed seismic source model of the 2019 Peru earthquake, including not only the rupture evolution but also the spatiotemporal distribution of focal mechanisms, we performed comprehensive seismic waveform analyses using both a newly developed flexible finite-fault teleseismic waveform inversion method and a back-projection method. The source model revealed a complex rupture process involving a back-propagating rupture. The initial rupture propagated downdip from the hypocentre, then unilaterally northward along the strike of the slab. Following a large slip occurring ∼50–100 km north of the hypocentre, the rupture propagated bilaterally both further northward and back southward. The spatial distribution of focal mechanisms shows that the direction of T-axis azimuth gradually rotated clockwise from the epicentre northward, corresponding to the clockwise rotation of the strike of the subducting Nazca Plate, and the large-slip area corresponds to the high-curvature area of the slab iso-depth lines. Our results show that the complex rupture process, including the focal-mechanism transition, of the Peru earthquake was related to the slab geometry of the subducting Nazca Plate.