Syrian and Iraqi leaders ended three days of talks yesterday on plans to unify their countries into a powerful force to counter Egyptian-Israeli peace moves. Iraqi Vice President Sadaam Hussein told reporters in Paris that the top-level delegations have made substantial progress.

Hussein stressed the importance of unifying the ruling Baath Socialist parties in Syria and Iraq as essential to the new alliance. Long locked in bitter ideological rivalry, the two were drawn together by their common opposition to the Camp David accords between Egypt and Israel.

Arab diplomatic sources said last weekend that the two countries had been planning to announce a merger of three key ministries, but Iraqi Foreign Minister Saadoun Hammadi expressed caution yesterday. He told a Lebanese newspaper that a unity formula could take up to three months. Hussein said the two countries are working sincerely for unity "now and forever."

In other Mideast developments yesterday:

Israeli Prime Minister Menachem Begin's adviser on Arab affairs resigned, complaining that his lack of authority made his post obsolete. Dr. Moshe Sharon, who had tried unsuccessfully to make the job a full ministry, said he lacked legal status. The resignation came at a time of increasing unrest among the 600,000 Arabs in Israel, who are 15 percent of the population.

Two soldiers from the United Arab Emirates contingent of the Arab truce force in Beirut were killed and three others wounded amid heavy sniper fire in a no-man's-land between rightist Christian militiamen and the Arab force in a suburban area. A police official said the victims probably lost their way and were mistaken for enemies by both sides.

Israeli bulldozers destroyed four houses belonging to suspected Palestinian terrorists in the occupied West Bank. An Israeli military spokesman said the owners had participated in at least 11 terrorist acts, and were members of the Fatah guerrilla organization. The razing of the houses came three days after an attack in which three Israelis were killed and 33 wounded in the resort town of Natanya, but the spokesman denied any connection between the two events.

Israeli Foreign Minister Moshe Dayan said at a meeting with journalists in Paris that time is working against the Egyptian-Israeli peace negotiations, and that the upheaval in Iran and the spread of Islamic revivalism are likely to turn Egypt away from the negotiations. Dayan said the Iranian turbulence concerns Israel because of 80,000 Jews there and the possible loss of oil supplies, although he said Israel has found alternative sources.