Actually, not only that it was occupied back then, it was also ethnically cleansed when all the Jewish survivors were evicted out from the Old City after the shelling of the Jewish Quarter in 1948.
From Wiki:
In 1948 during the Arab-Israeli War, its population of about 2,000 Jews was besieged, and forced to leave en masse. Colonel Abdullah el Tell, local commander of the Jordanian Arab Legion, with whom Mordechai Weingarten negotiated the surrender terms, described the destruction of the Jewish Quarter, in his Memoirs (Cairo, 1959):
"... The operations of calculated destruction were set in motion.... I knew that the Jewish Quarter was densely populated with Jews who caused their fighters a good deal of interference and difficulty.... I embarked, therefore, on the shelling of the Quarter with mortars, creating harassment and destruction.... Only four days after our entry into Jerusalem the Jewish Quarter had become their graveyard. Death and destruction reigned over it.... As the dawn of Friday, May 28, 1948, was about to break, the Jewish Quarter emerged convulsed in a black cloud - a cloud of death and agony."
—Yosef Tekoah (Permanent Representative of Israel to the United Nations) quoting Abdullah el-Tal, [6]
The Jordanian commander who led the operation is reported to have told his superiors: "For the first time in 1,000 years not a single Jew remains in the Jewish Quarter. Not a single building remains intact. This makes the Jews' return here impossible."[7] The Hurva Synagogue, originally built in 1701, was blown up by the Jordanian Arab Legion.
In the 1960s, American town planners, together with the Jordanian authorities, had planned that the quarter be transformed into a park.[8] During the nineteen year Arab administration, a third of the Jewish Quarter's buildings had been demolished by the Jordanians.[9] All but one of the fifty-three Jewish houses of worship that graced the Old City were destroyed. The synagogues were razed or pillaged and stripped and their interiors used as hen-houses or stables.[6]