JERUSALEM — YITZHAK SHAMIR'S decision to lead Israel's delegation to the Madrid peace conference has stirred domestic political emotions and helped set the stage for a future power struggle.Prime Minister Shamir's announcement was widely seen as a snub to Foreign Minister David Levy, who had been expected to lead the delegation. Mr. Levy responded by saying he would not go after all. According to Israel Television, Levy saw Shamir's decision as "an expression of no-confidence in him personally and a takeover by extremists of the Israeli line in the conference in the face of the entire world." A close Levy confidant, Likud Knesset member Reuven Rivlin, said Shamir's decision had changed the political landscape. "For the last three years, Mr. Levy was supporting Mr. Shamir," Mr. Rivlin told Israel Radio. "Everything has changed." Rivlin attacked Shamir's move and hinted at possible political retribution. "If Mr. Shamir decided to do something which is ... not according to the rules of the game, probably we should have to consider once again our attitude toward the leadership of the Likud Party," Rivlin said. If the politically ambitious Levy decides to challenge Shamir for leadership of the party before next year's elections, the consequences could be damaging for Likud. Two ultraconservatives, Housing Minister Ariel Sharon and Binyamin Begin, son of former Prime Minister Menachem Begin, have already said they intend to run. Likud party officials were said yesterday to be frantically urging Levy not to resign. The prime minister's senior adviser, Yossi Achimeir, urged Levy to reconsider. Officials at the Foreign Ministry expressed sorrow and surprise at Shamir's move but said preparatory work for the conference was still under way. Officials in both the prime minister's office and at the Foreign Ministry had for several weeks denied that a rift existed. At press briefings, it was emphasized that the relationship was one of "complete coordination." But relations have never been warm between Shamir and Levy, and a succession of leaks from the prime minister's office had served to undermine Levy's authority. Levy was one of three so-called "constraints ministers" who opposed the government's May 1989 peace initiative and urged Shamir to take a tougher line on the question of Palestinian representation. Yet since becoming foreign minister last year and in meetings with the US Secretary of State James Baker III, Levy has established a reputation as a more pragmatic negotiator than his hawkish colleagues. This, combined with his political ambition, are thought to have alarmed Shamir.