Rick Santorum attended a revival-type church service on Sunday night in Louisiana, where the Rev. Dennis Terry, pastor of the Greenwell Springs Baptist Church, offered some fire and brimstone in a videotaped sermon that on Monday was going viral because of his fiery comments.

“I don’t care what the liberals say, I don’t care what the naysayers say, this nation was founded as a Christian nation,” Mr. Terry said.

“There’s only one God, and his name is Jesus,” he continued. “I’m tired of people telling me that I can’t say those words. I’m tired of people telling us as Christians that we can’t voice our beliefs or we can no longer pray in public. Listen to me. If you don’t love America, if you don’t like the way we do things I have one thing to say — get out!”

Thunderous applause interrupted him before he went on.

“We don’t worship Buddha! I said we don’t worship Buddha, we don’t worship Muhammad, we don’t worship Allah, we worship God, we worship God’s son Jesus Christ.”

He said that the church had to be the conscience of the nation and went on to rail against abortion and homosexuality. His goal, he said, is to “put God back in America,” in homes, schools and “in our state house.”

As the congregation gave Mr. Terry an enthusiastic standing ovation, Mr. Santorum also stood and applauded.

At the end of the service, Mr. Terry held his hand over Mr. Santorum and Tony Perkins, president of the Family Research Council, and asked God to “have favor” on him, to “watch over him, bless him and keep him safe.”

He added: “For all those men that are running for office tonight, I pray you’ll speak to their hearts.” At this point, Mr. Santorum demonstrably nodded his head in agreement. Mr. Terry also asked, “I pray tonight for our president,” and Mr. Santorum nodded again.

Afterward, Mr. Santorum was pressed in Moline, Ill., on Monday, by reporters from Politico, The Associated Press and other news outlets whether he agreed with the full extent of Mr. Terry’s remarks. Mr. Santorum has spoken many times of his own belief that people of faith are being driven from the public square, but he has not called for those who “don’t love America” to “get out” of the country.

“If the question is, do I agree with his statement that America shouldn’t do that?” Mr. Santorum asked in response to the reporters’ questions. “No, if he was speaking for himself he’s obviously allowed to believe what he wants to believe but, obviously I believe in freedom of religion and all religions are welcome and should be. I think I’ve made that pretty clear throughout my campaign that I believe very much in freedom of religion, and folks should be able to worship whoever they want to worship and bring their thoughts in the public square.”