St. Tomaskyrkja sits at 1,100 metres above sea level on Filefjell, on the old route between eastern and western Norway. The original stave church was built around 1180-1200 and named after Thomas Becket, the English archbishop murdered in 1170. It may have started as a parish church for iron miners in the area. The church became infamous for something other than worship. People from Valdres, Sogn, Hallingdal, and Gudbrandsdalen gathered here to trade horses, find spouses, drink, and fight.
The Slidre vicar Hermann Ruge wrote that "many a young woman's virginity met its end" at the market. The bishop proposed shutting it down as early as 1747, and in 1808 the government approved demolition. The church was torn down to put an end to the chaos. For over a century, Filefjell had no church. In the early 1900s, poet Anders Underdal campaigned to rebuild it, laying a foundation stone in 1922.
But the project became entangled with politics when Nasjonal Samling, Norway's Nazi party, adopted the church rebuilding into their program. Underdal joined the NS at the urging of Quisling's propaganda minister. After the war, his involvement tainted the project and deterred others from contributing. New plans were eventually drawn up in the 1960s by architect Claus Lindström, and the current concrete and wood church was consecrated on 2 July 1971. Underdal was not present at the dedication.