Shaarey Tphiloh is a Modern Orthodox Jewish congregation and synagogue located at 400 Deering Avenue, in Portland, Maine, in the United States. The congregation claims it is the oldest continuously operating synagogue in Portland. The name of the synagogue literally means "Gates of Prayer" in Hebrew.
 Immigrant Jews started arriving in large numbers to Portland, Maine from the Pale of Settlement at the end of the nineteenth century. In 1873 a ritual slaughterer visited Portland to perform shehita.": 15  In the 1880s the Portland Jewish community increased to sixty families.: 16, 18  Over the next few decades, the Jewish population grew exponentially. In 1912, the Jewish population was 2000, in 1920 it climbed to 3000.  Portland was referred to as the "Jerusalem of the north" because of its religious Jewish population. In 1930 Jews were about ten percent of the city's general population. 
 In the late 1880s two prayer congregations emerged: Shaarith Israel and Beth Midrash Hagadol from approximately 80 Jewish families. In 1890 Rabbi Chaim (Hyman) Mordechai Lasker (1864-1932) was hired as the rabbi of Sharith Israel. Rabbi Lasker came from Łomża, Poland. He had studied in Kaunas (Kovno) and received ordination from Rabbi Yitzchak Elchanan Spektor.  Among his achievements in Portland was the organization of Talmudic study groups that continued for years after he left the city. Rabbi Lasker left Portland for Buffalo in 1895 and he was replaced by Rabbi A. Sharshafsky. He was rabbi from 1895 to 1897. After Rabbi Lasker left his role was filed by a Lazarus Druker, a learned immigrant from The Pale who also fulfilled the ritual duties of shechita for the community. Another shul was started in 1890 on Fore St. in Portland, calling itself Beth Hamidrash Hagadol. This group, headed by Isaac Abrams, also ran a Hebrew school. In 1899 Sharith Israel brought in a new rabbi named Rabbi Solomon David Ha-Kohen Sprince (1846-1929). Rabbi Sprince was born in Mezhirichi. He studied in Krynki (Poland) and Volozhin, under misnagdim teachers. He had served as a rabbi for a short stint in Paris and was friends with Rabbi Zadoc Kahn, the chief rabbi of France. Meanwhile, in 1901 another small shul, Beth Judah, brought in a rabbi named David Feinstein, but they agreed to call Rabbi Sprince of Sharith Israel, the Chief Rabbi of Portland. Nevertheless, in 1902, Rabbi Sprince left Portland for Montreal.: 22  
 Following this changeover and division in the community, an effort was made to coordinate and establish one large synagogue to represent the community as a gathering place for all. In 1900 Sharith Israel and Beth Midrash Hagadol agreed to build a new synagogue together.  It became known as Shaarey Tphiloh and was built on Newbury Street.
 The congregation's first building, a large, neo-Classical building, was constructed between 1901 and 1905 at 145 Newbury Street in the Old Port neighborhood of Portland. At the cornerstone dedication on September 14, 1904, Dr. Elias Caplan, a prestigious member of the congregation, declared that the community not only honored its Jewish traditions but also was meant to be patriotic to the United States, "“We are witnessing today in this great country the dawn of a new era… The institutions of this mighty republic are our institutions, its laws are our laws, its flag, the flag of the free and the brave, our flag." In 1907 the congregation hired its first Rav, Chaim Nosson Shohet, a deeply religious scholar who had served as a rabbi to Jewish communities in the Russian Empire (modern day Estonia and Lithuania).
 In 1915 a dispute between the board of directors and their rabbi, Rabbi Chaim Shohet, took place. Rabbi Shohet had served as the av beit din, or head of court, in Obeliai, Lithuania in the Kovno region and before that as a rabbi in Võru, the region of Livland (Livonia). He makes reference to his service to Jewish communities in the former Russian Empire in his scholarly work on Jewish law "Zekher Chaim" that he published around this time. Still, the congregation dismissed Rabbi Shohet from his position at Shaarey Tphiloh in 1916, but he remained in Portland and became rabbi at Congregation Adas Israel on Middle Street. Eventually that congregation became Congregation Etz Chaim and built a synagogue on India Street.  Also in 1915, Max Pinansky, a Harvard trained lawyer, asked the leaders of Shaarey Tphiloh to collaborate with him on a project to include more English in the prayer service and to permit mixed seating for men and women in the pews during the prayer service. Rabbi Isaac David Essrig, who succeeded Rabbi Shohet as the Rabbi of Shaarey Tphiloh, was from a very conservative religious background. His father, Rabbi Nachum Etrog, served as head of the beit din in Safed, Palestine.  Rabbi I. David Essrig himself authored a Talmudic Encyclopedia. Rabbi Essrig did not make the changes that Pinansky suggested to acculturate to the environment in Portland and the congregation remained wedded to the traditional Orthodox Hebrew liturgy with separate seating during the prayer service. In 1918 Shaarey Tphiloh and another congregation, Anshei Sfard, a breakaway congregation from Shaarey Tphiloh that had met in the basement of the building until moving to another location nearby, decided that they would share a rabbi. In 1923, the Etz Chaim Synagogue under the direction of Rabbi Moshe Shohet, the son of Rabbi Chaim Shohet, introduced sermons in English on Friday night, a sign that the wider Portland Jewish community was in favor of changes despite Rabbi Essrig's traditional stance. In 1926 Rabbi Essrig left Shaarey Tphiloh and Anshei Sfard and became rabbi of the Olive Street Synagogue in Los Angeles. The congregation was left with a rabbinic opening. In 1929, a religious council in the city was formed by the different Orthodox synagogues that allowed them to pool their resources in order to hire one rabbi for the different congregations.
 In 1930 Rabbi Abraham Miller served as religious leader. Rabbi Miller was a social activist. In 1925 he was part of a small delegation of rabbis from Poland and the United States who met with President Coolidge to thank him for he speech on "Toleration and Liberalism."   In 1927–1928, before arriving in Maine, Rabbi Avraham Miller had also protested efforts in New York City to build the path of what would become the Jackie Robinson Parkway connecting Brooklyn and Queens through the Mt. Carmel Jewish cemetery. The next rabbi to serve after Rabbi Miller was Rabbi Mendel Lewittes in 1936. Rabbi Lewittes (1912–1994), a graduate of RIETS was described as an "accomplished scholar and orator" despite being only 27 years old when he started his career at Shaarey Tphiloh. Lewittes was rabbi for five years but then took a position in Dorchester, MA.  After Rabbi Lewittes, the position was filled by Rabbi Aaron Greenbaum in 1942. Rabbi Greenbaum was a promising scholar and community activist, and the son-in-law of a prominent rabbi from New York, Rabbi Menachem Mendel Kasher. Around this time, Shaarey Tphiloh was in an adjustment period. The rabbi was responsible for serving the Woodfords neighborhood of the Jewish community and also the older community located around the shul on Newbury St.  Rabbi Greenbaum was also struggling to establish a central Hebrew school for educating the children in the community. At the same time, the congregation had aspirations to take on a more prominent role, as evidenced by the hiring a prominent cantor Samuel Zimelman, who had served as cantor of the Hochschule Synagogue in Łomazy, Poland and was brought on as cantor in 1945. He stayed on as the cantor, until Martin Davidson followed him as cantor in 1972.
 In 1949 the congregation dedicated a new mahogany ark, or aron kodesh, for the synagogue on Noyes St. When the building on Noyes St. was sold in the 1970s the Torah ark or aron kodesh for the Torah scrolls was taken to a synagogue in Lexington, MA.
 The dedication of the Torah scroll was just one way that the congregation was displaying greater wealth and striving for greater respectability. Like other American Jewish communities, following World War II many Jews in the United States moved from the city to the suburbs. In the case of Portland, the community center shifted from Munjoy Hill to Woodford's Corner. In 1956, as the Jewish community moved to the "suburbs" of Portland, the congregation moved to Noyes Street, not far from Woodford's Corner. Rabbi Moshe Bekritsky served as spiritual leader of the synagogue for 26 years, from 1948 until 1974. As rabbi of Shaarey Tphiloh he was in charge of the elementary school Jewish education and also kosher certification in Portland. In 1952 he opened the first full-time elementary school in Portland with tuition set at $300. At the early part of his tenure there was a daily minyan and gemara classes taking place in three Orthodox synagogues in Portland, at Shaarey Tphiloh on Noyes St. and at Shaarey Tphiloh on Newbury St., and also at the Etz Chaim Synagogue. At the close of his rabbinate only at Shaarey Tphiloh on Noyes St. was there still a minyan and study classes. In 1968 Rabbi Bekritsky noted in a Yom Kippur sermon that people still admired Shaarey Tphiloh even if their personal observance of Jewish laws had lapsed because they wanted their synagogue to be "above me, a goal toward which I can climb and towards which I can work." But he added that people whose spouses were "social climbers" went to they synagogue around the corner. Despite the trend toward greater attendance at the synagogue around the corner, Temple Beth-El, hundred of people still attended Shaarey Tphiloh during his tenure, especially on the holidays for the Yizkor service.
 In 1975 the congregation put its property on Newbury street up for sale. From 1972 to 1976 Rabbi Stephen Dworken served as rabbi of Shaarey Tphiloh. Rabbi Dworken was a popular rabbi in Portland who was naturally able to connect to people and also connected with others because of his background growing up in a non-Orthodox community. Following his tenure at Shaarey Tphiloh he went on to national prominence in the Orthodox world, as an executive vice president of the RCA, or Rabbinical Council of America. He was followed by Rabbi Leon Mozeson, 1977–79, Rabbi Asher Reichert 1979–1984, and then Rabbi Lawrence S. Zierler was installed as the congregation's rabbi in 1987. Rabbi Zierler was a Yeshiva University graduate and was proud of "crossing bridges" in his rabbinate to create strong ties with non-Orthodox Jewish denominations in the city and also with the wider non-Jewish population. In 1991, Rabbi Joseph Reifman was spiritual leader, in 1992 Marc Renner, who was followed by Rabbi Marc Mandel. Rabbi Mandel held the position for a number of years from 1992 on until he left for California. Rabbis Isaac Yagod and Simcha Green held the title of rabbi from 1999 into the new millennium.
 In 2007 Rabbi Akiva Herzfeld from Yeshivat Chovevei Torah became rabbi of the shul and served until 2014. Rabbi Aaron Shub, also from YCT Rabbinical School, followed him. In 2015, the congregation decided to downsize and rent space in the building of Temple Beth El, around the corner from its previous home on Noyes St. Rabbis from different denominations carried Torah scrolls from the building on Shaarey Tphiloh on Noyes St. to its new home. The two congregations coexist in separate prayer spaces, and join each other for social and other community events. As for the synagogue building on Noyes Street, it became home to the Portland Community Squash, where squash players from 26 countries play in the space that was designed as the main prayer hall.
 A video of a Torah scroll dedication ceremony from 1955 has been preserved and prepared by the Maine Historical Society. In the video, one sees how treasured the Torah was to the Shaarey Tphiloh community. At the dedication, honored men from the community were invited to write the last letters in the Torah scroll and honored women were invited to add a stitch into the parchment of the Torah scroll to connect the final piece of parchment to the whole Torah scroll.
 Until mid 1940s the congregation did not include prayer books with English translation. In the mid-1940s a congregant I. Edward Cohen insisted on buying prayer books, machzorim, in dual language for the High Holidays.
 At the Newbury St. location of Shaarey Tphiloh the mikvah was located at the back end of the synagogue building. In 2010 the Shaarey Tphiloh mikvah at Noyes St. was established as a community mikvah. It was named Mikvat Shalom, an independent nonprofit organization. The mikvah was meant to represent the diversity of Maine's Jewish community, with representation from Chabad, Modern Orthodox, Conservative, Reform and non-denominational congregations.
 In the twentieth century wealthier members of the synagogue had summer homes in Old Orchard Beach. Already at the beginning of the century Old Orchard Beach attracted visitors from Jewish communities in Maine and Canada. In 1909 Joseph Goodkowsky built the Lafayette Hotel "an all-kosher establishment." In 1912 they raised $3,500 to build Congregation Beth Israel. The congregation built separate doors for men and women to access the sanctuary, but in later decades remodeled the building with an atrium at the entrance. on East Grand Ave. and Cleeve St.
 No community eruv was ever built in Portland. Early Jewish immigrants used to tie their kerchiefs together to form a belt and then place a handkerchief in their pocket at synagogue on the Sabbath.
 The congregation maintained its own chevra kadisha for many decades. It also has its own cemetery for its members at Mt. Sinai Cemetery on Hicks Street in Portland. Some Shaarey Tphiloh members are also buried at the Mt Carmel cemetery adjacent to Mt Sinai. Some Shaarey Tphiloh members also were buried at the Temple Beth El Memorial park.
 The following individuals have served as rabbi of Shaarey Tphiloh: