The Islamic foreign ministers today called for an immediate meeting of the U.N. Security Council to stop Israel from annexing the occupied Arab quarter of Jerusalem and making it the capital of the Jewish state.

The resolution was a reaction to the Israeli parliament's reaffirmation earlier this month of the government's policy to hold all of Jerusalem -- considered a holy city for the Moslem, Christian and Jewish religions -- and to make it Israel's capital for eternity.

The foreign ministers passed the resolution on what was to be the final day of their regular meeting, but it appeared they would keep working through the night on parts of resolutions concerning Afghanistan and Iran, while keeping the main thrust of the resolutions intact, and conclude their meeting Thursday.

Most ministries of the Israeli government are now based in Jerusalem, but other countries -- including the United States -- refuse to recognize it as the capital of Israel and keep their diplomatic missions in Tel Aviv.

While the vote of the Israel parliament does not signal a change in the policy of the government there, its timing just before the Islamic foreign ministers' conference sent shock waves through the Moslem world.

Its timing is also seen by independent observers here as an attempt by Israel to bring about Moslem condemnation of the United States and drive a wedge between America and the strategically located, oil-rich Arab states.

For example, Abdul Muhsin Abu Meizer, the head of the Palestine Liberation Organization delegation here, was able to say: "The main enemy of the Islamic world is the United States. We will never believe that Carter can be a Moslem in Afghanistan when he is against Islam in Jerusalem, against Islam in Palestine and against Islam in Iran. Nobody in this conference can be deceived that Jimmy Carter can be Muhammad Ali Carter."

As an example of the way the anti-American feeling over Israel carries over to other issues, Abu Meizer said the PLO supports the Soviet-installed government of Babrak Karmal in Afghanistan because Moscow has been a true supporter of the Moslem fight against Israel.

"We are not ready to adopt any stand that helps America with its conflict with the Soviet Union. We want to help and serve the real interests of the Islamic world and not the United States," said Abu Meizer. The PLO receives a major share of its arms from Moscow.

The Islamic foreign ministers said they are watching to see how the United States will vote when the issue of Jerusalem comes up in the Security Council. The United States has been firm in its opposition to Israel's taking over the whole of Jerusalem and has refused to move its embassy there. But last month it vetoed a pro-Palestinian resolution in the Security Council and said its U.N. vote against continued Jewish settlements of the West Bank was a mistake because the resolution contained language about Jerusalem that President Carter felt was unacceptable.

On Afghanistan, it appeared late tonight that the Islamic Conference was heading toward passing a resolution that would allow direct talks with the Babrak government in an effort to get the Soviet Union to withdraw its nearly 100,000 troops from that country.