US President Barack Obama meets with leaders of the Church of Jesus Christ of Latter-day Saints on April 2, 2015 in Salt Lake City, Utah. Clockwise from top right: LDS President Henry B. Eyring, Obama, Elder D. Todd Christofferson, President Dieter F. Uchtdorf, and Elder L. Tom Perry. (MANDEL NGANMANDEL NGAN/AFP/Getty Images)

President Obama met with leaders of the Church of Jesus Christ of Latter-day Saints on Thursday during his trip to Utah. Among the topics they discussed was immigration, according to the Salt Lake Tribune. And while Mormons are heavily Republican and Obama is, well, not, they have a large amount of common ground on this issue.

The first thing to know is Obama is unpopular with Mormons. Like, really unpopular. A July Gallup poll found only 18 percent approve of the job he's doing, the lowest percentage among religious groups. But the church's stance on immigration is actually more similar to Obama's than the GOP's is these days.

In November 2010, the church came out in favor the Utah Compact, a document about guidelines for immigration policy that emphasized keeping families together over enforcement. It came a few months after Arizona passed its controversial immigration enforcement bill, SB 1070 (which just so happened to be sponsored by a Mormon, state Sen. Russell Pearce), and showed the church could turn public opinion on the issue. According to Utah Voter Poll, the percentage of Utah voters who said they favored Arizona-style immigration reform dropped from 66 percent to 57 percent by 2011.

[The lead singer of the Killers says Romney wasn't a good ambassador for Mormons. Here's why.]

The Utah Compact was even praised by the White House, which said it demonstrated a red state could take a "pro-reform position without political harm."

That the church would support immigration reform isn't surprising. A majority of Mormons live outside the U.S. and Canada, and its missionaries frequently teach immigrants. In fact, a 2012 study found Mormons who served as missionaries are more likely than those who didn't to believe that immigrants "strengthen the country." Those who served missions where they spoke a language other than English are the most likely to say this.

While most Mormons aren't Obama fans, their church does have a stance on immigration that Obama can agree with. And that made immigration the perfect topic for church leaders to talk on with him Thursday.