THE CASE of Jonathan Jay Pollard, the American intelligence analyst who has pleaded guilty to spying for Israel, was always two cases. The one in the courtroom is just about over, although Mr. Pollard and his wife -- she pleaded to two lesser charges -- are yet to be sentenced. The other case, involving the pattern of ties between Israel and the United States, will be working its way out for some time.

Mr. Pollard passed on secrets for more than a year and took money. He betrayed his trust. That he did so with a friendly country does not so much mitigate the act as move its major consequences from the military to the political sphere. He has diminished the mutual trust on which the friendship of the United States and Israel necessarily rests.

No single citizen is a principal custodian of this trust. The Israeli government is, and its conduct remains in the main troubling. Prime Minister Shimon Peres did apologize for this ''unauthorized'' operation, did cooperate in the investigation of it to the State Department's satisfaction and did reaffirm Israel's declared policy of no spying on its leading patron. Yet the root question remains of how Israelis could have launched an operation whose finest imaginable gains in intelligence could not have come near to matching the losses in trust attendant upon discovery. How plausible are official denials of responsibility for an operation whose handlers, when unmasked, were promoted? Was this project connected to other shadowy international operations involving Israelis that have come to light in the last year? William Webster, head of the FBI, complains that Israeli cooperation in the Pollard case was ''selective''; Justice Department sources say that Mr. Pollard, awaiting sentencing, is telling of other Israeli operations here.

More is going on than the predictable divergence between American diplomats, who seem prepared to join Israel in lancing the Pollard boil, and law enforcement officials. A usually hidden side of American-Israeli relations is in partial view. In strategic and intelligence matters, the two countries have deep common interests. Each, however, values first its freedom of movement. Israel's permanent condition as a nation at war with most of its neighbors, and as one that believes ultimately it can trust only itself, inclines it toward high-risk exertions to gain narrow additional increments of security. The United States, as a great power with a large and diverse presence in the Middle East, has permanent reason to ensure that it is not surprised by friend or foe.

In brief, Israel and the United States not only share and bargain information but also spy on each other. Most of the time the spying is done within certain bounds. In the Pollard case the bounds were broken, and it falls to Israel to find ways to show Americans that their confidence and generous patronage will not be further abused.