The Valley of the Fallen , a large church that was carved into the mountains north of Madrid from 1940 to 1958 by prison labor , including political prisoners , is Spain 's most conspicuous reminder of Franco 's dictatorship , and the most cherished among many of his supporters , although soldiers on both sides of the Spanish Civil War are buried there .