On 21 October 1187 , the day after the death of Pope Urban III , Alberto di Morra was elected pope and took the name Gregory VIII in honor of Pope Gregory VII .
Cardinal Morra was elected pope on 11 October 1187 .