Three Jewish militants were freed today after serving less than seven years for killing three Arabs and maiming two Palestinian mayors in car bombings. They were greeted as heroes by fellow Jewish settlers.

The three, members of the Jewish Underground, which carried out attacks in the West Bank in the early 1980's, were granted a reduction of their original life sentences three times by Israeli President Chaim Herzog. They were then released on good behavior in a fourth cut in their terms.

Dozens of West Bank settlers danced and chanted outside Maasiyahu Prison in Ramle, a town in central Israel, as the three former members of the underground -- Menachem Livni, Shaul Nir and Uzi Sharbav -- were released.

Members of the crowd hoisted the three men on their shoulders, and Noam Arnon of the Gush Emunim settler movement praised them. 'They Are Heroes'

"They are heroes because they decided to sacrifice themselves, their future, their families, for the security of Jews," he said on Israel radio.

About a dozen Israeli liberals held a counter-demonstration to protest the early release.

"This is a message of contempt for human life, of making a difference between one type of life and another, and it violates the basic tenet of equality before the law," said Yitzhak Zamir, a former Attorney General.

The three settlers were the last of 27 members of the Jewish Underground to be freed from prison.

The group carried out car bombings in which two West Bank Mayors, Bassam Shaka of Nablus and Karim Halaf of Ramallah, lost limbs and a grenade and gun attack that killed three students and wounded 30 others at Hebron's Islamic College.

Mr. Shaka said today that the release was part of a Government policy to "encourage extremists to act against Palestinians."

Mr. Livni, the leader of the group, was asked by Israel radio Wednesday if he was sorry for his actions. Regret Called 'Childish'

"The use of the word regret in this case is childish," he replied. He said he acted because of the Government's failure to combat Arab terrorism.

Mr. Herzog reduced the sentences of the three men to 24 years, then 15, then 10. After announcing the last reduction in 1989, the President's spokesman said Mr. Herzog was "convinced that the three had expressed unambiguous and honest regrets."

Two weeks ago, a parole committee cut the terms by another third for good behavior.

In the occupied Gaza Strip, Israeli troops shot and killed a Palestinian today after he stabbed and wounded three soldiers on patrol in the Shati refugee district, the army said.