Hacham Haim Abraham Gagin was born in Kushta (Constantinople) in 1787 and immigrated to Jerusalem as a child. In 1842 he was ordained as Hacham Bashi – the first Rishon LeZion (Chief Rabbi) who served in the land of Israel. He was also Head of the Beit EL kabbalist yeshiva in Jerusalem.
In his day, the Samaritans were in danger of extermination, because the Muslim clergy claimed that the Samaritans had no religion and believed in none of the books written by the Holy Spirit. The Samaritans of the city of Nablus, whose lives were in mortal danger, pleaded for Hacham Haim Abraham Gagin's help. Hacham Haim Abraham Gagin gave them a document stating that the Samaritan nation is an offshoot of the nation of Israel and who recognizes the truth of the Torah, and their lives were spared.
Hacham Haim Abraham Gagin authored Mincha Tehora, on Tractate Minchot, which was printed in Salonica in 1835. In 1841 he helped establish a printing press in Jerusalem, where he had two of his books printed: Sefer HaTakanot Ve'HaHasmachot, printed in 1841, one of the first books printed in Jerusalem, and Hukei Haim, printed in 1842. His book of sermons, Haim BiYerushalaim was published after his death, in 1842.
Hacham Haim Abraham Gagin passed away in Jerusalem on 20 Iyar, 5608 (1848), and was buried on Jerusalem's Mount of Olives.