Mohammed died in 632 AD. At the time, Jerusalem was a Christian city. It was captured by Khalif Omar six years after Mohammed’s death. Prior to the capture, the Church of Saint Mary of Justinian stood on the Temple Mount. There was no mosque in the entire city. The Dome of the Rock was built in 691. Twenty years later, the Church of Saint Mary was converted into a mosque with the familiar dome on top. It was named Al Aqsa, so it would sound like the “furthest mosque” mentioned in the Koran. That’s the basis of the Islamic claim to Jerusalem and the Temple Mount.