An earthquake of magnitude 5 struck the Afghanistan-Tajikistan border region on Friday, the German Research Centre for Geosciences said.