Alaska Gov. Sarah Palin told ministry students at her former church that the United States sent troops to fight in the Iraq war on a "task that is from God."
Republican vice presidential candidate also urged ministry students to pray for a plan to build a $30 billion natural gas pipeline in the state, calling it "God's will."
Palin asked the students to pray for the troops in Iraq, and noted that her eldest son, Track, was expected to be deployed there.
"Our national leaders are sending them out on a task that is from God," she said. "That's what we have to make sure that we're praying for, that there is a plan and that plan is God's plan."
A video of the speech was posted at the Wasilla Assembly of God's Web site before finding its way on to other sites on the Internet.
Palin told graduating students of the church's School of Ministry, "What I need to do is strike a deal with you guys." As they preached the love of Jesus throughout Alaska, she said, she'd work to implement God's will from the governor's office, including creating jobs by building a pipeline to bring North Slope natural gas to North American markets.
"God's will has to be done in unifying people and companies to get that gas line built, so pray for that," she said.
"I can do my job there in developing our natural resources and doing things like getting the roads paved and making sure our troopers have their cop cars and their uniforms and their guns, and making sure our public schools are funded," she added. "But really all of that stuff doesn't do any good if the people of Alaska's heart isn't right with God."
Palin attended the evangelical church from the time she was a teenager until 2002, the church said in a statement posted on its Web site. She has continued to attend special conferences and meetings there. Religious conservatives have welcomed her selection as John McCain's running mate.
Rob Boston, a spokesman for Americans United for Separation of Church and State, lamented Palin's comments.
"I miss the days when pastors delivered sermons and politicians delivered political speeches," he said. "The United States is increasingly diverse religiously. The job of a president is to unify all those different people and bring them together around policy goals, not to act as a kind of national pastor and bring people to God."
The section of the church's Web site where videos of past sermons were posted was shut down Wednesday, and a message was posted saying that the site "was never intended to handle the traffic it has received in the last few days."