This is Philidor's Position. Black is safe if the defending King controls the queening square and White cannot either drive it away or construct a mating net with King and Rook. Here White was threatening to play Kd6 and Black's move prevents this.
1...Rh6
2.e6
Rh1
Now Black prevents any further progress by long range checks
3.Kd6
Rd1+
4.Ke5
Re1+
draws *