A cursory review of religion and history shows that there is not much of a contest.
Jerusalem has a unique importance to Jews. It has a unique place in Jewish law and a pervasive presence in the Jewish religion. Jews pray toward Jerusalem, mourn the destruction of their Temple there, and wishfully repeat the phrase, "Next year in Jerusalem." It is the only capital of the Jewish state, ancient or modern.
In contrast, Jerusalem has a distinctly secondary place for Muslims. It is not once mentioned in the Qur'an or in the liturgy. The Prophet Muhammad never went to the city, nor did he have ties to it. Jerusalem has never served as the capital of any Muslim polity, and has never been an Islamic cultural center.
Mecca, rather, is the "Jerusalem" of Islam. Mecca is where Muslims believe that Abraham nearly sacrificed Ishmael, where Muhammad lived most of his life, and where the key events of Islam took place. Muslims pray in its direction five times each day, and it is where non-Muslims are forbidden to set foot.
Jerusalem being of minor importance to Islam, why do Muslims nowadays insist that the city is more important to them than to Jews? The answer has to do with politics. Muslims take religious interest in Jerusalem when it serves practical interests. When those concerns lapse, so does the standing of Jerusalem. This pattern has recurred at least five times over 14 centuries:
The Umayyads also did something tricky: The Qur'an states that God took Muhammad "by night from the sacred mosque in Mecca to the furthest [in Arabic, al-aqsa] place of worship." When this passage was revealed (about 621), "furthest place of worship" was a turn of phrase, not a specific place. But decades later, after the Umayyads built a mosque in Jerusalem that they called Al-Aqsa, Muslims interpreted the passage about the "furthest place of worship" as a reference to Jerusalem. When the Umayyads fell in 750, however, Jerusalem lapsed into near obscurity.
Then, safely back in Muslim hands in 1187, the city lapsed into its usual obscurity. The population declined, and even the defensive walls fell.
When the Jordanians won the Old City in 1948, Muslims predictably lost interest again in Jerusalem. It reverted to a provincial backwater, deliberately degraded by the Jordanians in favor of Amman, their capital.
Moreover, in an act of startling audacity, Muslims claimed that "Jerusalem is Arab" and denied Jewish ties to the city. The Western (or Wailing) Wall is Judaism's most holy site, but some Muslims claimed it as the site where the Prophet tethered his horse on the night journey to the "furthest place of worship." In this spirit, King Faysal of Saudi Arabia waved away any Jewish connection: "The Wailing Wall is a structure they weep against, and they have no historic right to it. Another wall can be built for them to weep against."
Such sentiments help explain why the Camp David negotiations collapsed over the City of David.