Donald Trump has been given a lesson in Christian values, humility and kindness during a service in an Iowa church just two weeks before primary voting begins in the race for US president.

Religious voters are a major factor in Iowa, the opening contest on the presidential nominating calendar, where Trump’s chief challenger in the Republican race is Texas senator Ted Cruz, a conservative preacher’s son who has made deep inroads with evangelicals.

Trump has appeared to struggle to affirm his Christian credentials and during an hour-long service at Muscataine’s First Presbyterian Church, the Rev Dr Pamela Saturnia also indirectly questioned some of his policy positions.

“Jesus is teaching us today that he has come for those who are outside of the church,” she said, preaching a message of healing and acceptance for “those who are the most unloved, the most discriminated against, the most forgotten in our community and in our world”.

Among those she cited were “the Syrian refugees” and “the Mexican migrants”.

Trump has advocated barring all Syrian refugees from entering the country because of what he claims are potential security risks and deporting all of the estimated 11 million immigrants living in the United States illegally. He has said he wants to create a safe zone for refugees instead.

“I don’t know if that was aimed at me … perhaps,” Trump said after the service.

As a candidate, the thrice-married New Yorker has worked to foster relationships with Christian leaders. He received a glowing introduction last week from Jerry Falwell Jr, president of one of the country’s most prominent evangelical Christian universities, and on Saturday he campaigned with the Rev Robert Jeffress of First Baptist Dallas, a megachurch.