Edwin Gaustad, a preeminent scholar on the separation of church and state who did groundbreaking work mapping the nation’s religious landscape, died March 25 at an assisted-living facility in Santa Fe, N.M. He was 87. The cause of death was not reported.

Dr. Gaustad was prominent among a small group of mid-20th-century historians who broadened the study of religion in the United States from theological schools to a wider university setting, said Leigh Eric Schmidt, a Harvard University professor.

A professor emeritus at the University of California at Riverside, Dr. Gaustad was a leading expert on America’s Colonial period, especially in the areas of religious liberty, pluralism and dissent.

He wrote more than a dozen books on religious history. They included “A Religious History of America,” a popular 1966 text that was last updated, with Schmidt’s help, in 2002; “Church and State in America,” published in 1998; and “Roger Williams,” a 2006 biography of the theologian who helped found Rhode Island and the Baptist church.

One of his most wide-ranging projects was the “Historical Atlas of Religion in America,” completed in 1962.

Dr. Gaustad wanted his work to speak to the broader public culture, “to make the historian’s voice count in public debates of church and state,” Schmidt said.

A year after Dr. Gaustad published “Sworn on the Altar of God” (2001), a religious biography of Thomas Jefferson, he testified as an expert witness in the legal case brought by the American Civil Liberties Union and other groups against an Alabama judge who refused to remove a monument of the Ten Commandments from the state courthouse.

When a lawyer asked whom Jefferson was referring to when he wrote that liberties are a gift from God, Dr. Gaustad said, “The God of nature,” which is “the God we see around us,” the Associated Press reported in 2002.

“Not the God of the Bible?” he was asked.

“Not for Jefferson,” Dr. Gaustad replied.

Edwin Scott Gaustad was born Nov. 14, 1923, in Rowley, Iowa. He grew up in Houston. During World War II, he served in the Army Air Forces as a bombardier stationed in Italy.

He earned a bachelor’s degree in history and English in 1947 from Baylor University. At Brown University, he studied under noted early American history professor Edmund S. Morgan and received his master’s in 1948 and his doctorate in 1951 in the history of religion.

After teaching at Georgia’s Shorter University, Dr. Gaustad was a humanities professor at the University of Redlands in California from 1957 to 1965 before joining Riverside. He retired in 1989.

Throughout his career, Dr. Gaustad, who was Baptist, remained emphatic about the need for separation of church and state.

“Any time you put the power of the state . . . behind conformity and religion, you’re calling for religious persecution,” Dr. Gaustad told the Charlotte Observer in 1999.

“From our relaxed point of view,” he said, “we say, ‘Oh, that could never happen.’ But the fact is it happened over and over again.”

Helen, his wife of 63 years, died in 2009. Survivors include three children; and a great-grandson.

— Los Angeles Times