Context. The relation between solar surface rotation and sunspot activity still remains open. Sunspot activity has dramatically reduced in solar cycle 24 and several solar activity indices and flux measurements experienced unprecedentedly low levels during the last solar minimum. Aims. We aim to reveal the momentary variation of solar surface rotation, especially during the recent years of reducing solar activity. Methods. We used a dynamic, differentially rotating reference system to determine the best-fit annual values of the differential rotation parameters of active longitudes of solar X-ray flares and sunspots in 1977-2012. Results. The evolution of rotation of solar active longitudes obtained with X-ray flares and with sunspots is very similar. Both hemispheres speed up since the late 1990s, with the southern hemisphere rotating slightly faster than the north. Earlier, in 1980s, rotation in the northern hemisphere was considerably faster, but experienced a major decrease in the early 1990s. On the other hand, little change was found in the southern rotation during these decades. This led to a positive asymmetry in north-south rotation rate in the early part of the time interval studied. Conclusions. The rotation of both hemispheres has been speeding up at roughly the same rate since late 1990s, with the southern hemisphere rotating slightly faster than the north. This period coincides with the start of dramatic weakening of solar activity, as observed in sunspots and several other solar, interplanetary and geomagnetic parameters.