IT WENT DOWN to the wire in Israel, but finally the caretaker prime minister, Likud's Yitzhak Shamir, eked out parliamentary approval to form a new narrow coalition government with other parties of the center-to-extreme right. The alternative forgone was to renew the broad ''unity'' coalition with Labor that collapsed some months ago. There are many reasons why the outcome matters greatly to Israelis, but there is one overwhelming reason why it matters to Americans. Notwithstanding the overall fascination of party politics in Israel, the first question to be asked is whether Israel has a government able to take a responsible part in seeking peace in the Middle East.

The record is instructive. Last year Mr. Shamir put forward a peace proposal intended to fence out the PLO, the body that unquestionably speaks for most Palestinians, and to draw in some imagined and inconsequential non-PLO others. Undeterred, American diplomats and Arab moderates found ways to make the proposal realistic and workable. Mr. Shamir responded by finding occasion to bring the fragile diplomatic process to a halt. The inevitable enraged Palestinian faction then launched a terrorist raid that he promptly used to demand that Washington stop talking with the PLO. Yesterday Mr. Shamir went a step farther, openly accusing the United States of encouraging terrorism by conducting a dialogue with the PLO. He also said that broader Arab hostility -- Iraq's militancy, for instance -- had put territorial concessions out of the question.

In fact, a complete reversal has taken place: once only Israel called for negotiation and accepted the fundamental principle of an exchange of land for peace, and now only the PLO does.

The American government has been saying that opening a peace option is not only desirable for its own sake but urgent and vital to relieve pressures built up by the Palestinian uprising, the Israeli response to it, and other developments. This remains so. Among those other developments, the surge of Soviet Jewish immigration is surely the most compelling. Arabs fear, and some Israelis believe, that what Israel most needs to take in the new immigrants is land -- the West Bank. Other Israelis believe that what Israel most needs, for all its national purposes, is peace. This is the line of Israeli thinking that Americans are duty-bound to reinforce. It is ironic, not to say tragic, that an American government may be more committed to an early settlement in the Middle East than an Israeli government, but that does not give cause for the United States to diminish its effort for peace.