The prayer was aimed at invoking heavenly mercy against "dangers threatening the Land of Israel" in the wake of reports about US Secretary of State John Kerry's impending framework agreement, organisers said.
Police said 2,000 people attended the gathering.
They included Housing Minister Uri Ariel and other members of the far-right Jewish Home party, part of Prime Minister Benjamin Netanyahu's coalition but fiercely against his professed two-state solution.
Since he kick-started the latest round of peace talks in July, Kerry has been trying to push Israel and the Palestinians towards a framework agreement ahead of an agreed April deadline.
More From This Section
"We are not against the government, we are here to say it must resist the pressures to give part of Jerusalem to make it the capital of the Palestinian state," he told AFP.
Moshe Cohen of the Beit El settlement, who was one of the event's organisers, told AFP: "Kerry's plan endangers us since he wants to separate between the Jewish people and the Land of Israel."
Jews are not allowed to pray inside the compound itself.