MUSCATINE, Iowa — Donald Trump attended a church service here Sunday that served as both a gesture of fellowship to evangelical voters and another sign of the Republican front-runner’s attention to retail politics ahead of the Iowa caucuses.

The stop comes as Trump is competing directly with his chief rival in the Iowa caucus race, Sen. Ted Cruz of Texas, for the support of religious conservatives who remain a deeply influential voting bloc.

Trump, a Presbyterian, visited the First Presbyterian Church, where he sat in the fifth row and clasped his hands in prayer as he listened to the pastor, the Rev. Dr. Pam Saturnia, urge those in attendance to “unite our hearts and minds as we worship God.”

Saturnia also referred to the immigration debate, which for months has propelled Trump’s bid for the Republican nomination.

“Syrian refugees and Mexican migrants,” Saturnia said in her sermon, should be welcomed rather than shunned by Americans. “Instead of feeling rage at Jesus that we have to share him, we are called to do just that. Share Jesus with the ones who need him.”

As the elderly organist played songs of praise, Trump stood and nodded along. When attendees responded together to hymnals, Trump joined them, tracing his finger along a paper pamphlet.

During the offering of peace, Trump grasped hands and said, “Peace be with you” to a dozen people who approached him.As he entered the church, Trump was asked about what his faith meant to him and he replied, “A lot.”

“Very good, beautiful,” Trump said when asked about how it felt to be in Iowa for a service.