In the aftermath of Prime Minister Yitzhak Rabin's decision to remove himself from power, attention is now turning to the man who, besides Rabin himself, contributed most to the prime minister's downfall.

Aharon Barak, 42, Israel's attorney general, has become a relentless nemesis of the Labor Party's wrongdoing without regard to those who appointed him.

Although Israel's attorney general is a civil servant appointed by the government, during Barak's administration - he was appointed in 1975 - the attorney general has developed into an official independent of the government and the party in power, guided only by question of law.

Ironically, Rabin appointed Barak in an effort to reform the system because previous attorneys general had been accused of being too subservient to the administration in power. Barak was dean of law at Hebrew University before he took up his present post.

It was Barak who insisted upon the arrest of Asher Yadlin, head of the labor federation's health fund and Rabin's personal choice for governor of the Bank of Israel. Yadlin was later found guilty and setenced to five years in prison for fraud and bribery.

It was Barak who, in a stormy meeting at Rabin's house in January, insisted that the investigation of corruption against Housing Minister Avraham Ofer not be dropped even after Rabin had promised he would be cleared. Ofer later committed suicide by shooting himself on a Tel Aviv beach.

And it was Barak who, after a decision had been made simply to fine the Rabins for their illegal bank accounts in Washington, insisted that Mrs. Rabin be thoroughly investigated with a view toward criminal prosecution.

Last night the prime minister decided that since the illegal accounts had been a joint, he could not politically survive the scandal, and so he announced the end of his political career.