WASHINGTON ― President Barack Obama on Monday warned that Republicans in Congress who deny climate change contribute to a growing problem that he hoped to give more political urgency by emphasizing moral issues.

“Climate change is happening even faster than five years ago or 10 years ago,” Obama said. “What we’re seeing is the pessimistic end of what was possible, the ranges that had been discerned or anticipated by scientists, which means we’re really in a race against time. We can’t put up with climate denial or obstructionist politics for very long, if we want to leave for the next generation beautiful days like today.”

Obama made the remarks on a panel focused on how to make climate change resonate politically. The panel included climate scientist Katharine Hayhoe and was moderated by actor and environmental activist Leonardo DiCaprio.

The president called out members of Congress “who scoff at climate change at the same time as they are saluting and wearing flag pins and extolling their patriotism,” noting that military officials warn the displacement of people due to climate effects has become a national security issue.

Monday’s panel at the White House “South by South Lawn” festival preceded the U.S. premiere of DiCaprio’s climate change documentary, “Before the Flood,” which will air on the National Geographic channel later this month.

The Oscar winner opened the panel by explaining that he planned to release the documentary before the November election to highlight the political importance of the issue. Like Obama, DiCaprio had strong words for climate change deniers.

“If you do not believe in climate change, you do not believe in facts, or in science, or in empirical truths, and therefore, in my humble opinion, should not be allowed to hold public office,” DiCaprio said.

Obama acknowledged that one major obstacle in prioritizing climate change politically is that it requires long-term solutions.

“Climate change is almost perversely designed to be really hard to solve politically,” the president said. “The natural inclination of political systems is to push that stuff off as long as possible.”

Hayhoe, the climate scientist, conceded difficulty pinpointing short-term direct effects of climate change, which skeptics often use as an argument. But she noted that typical weather events like droughts and floods “are getting more extreme.”

“Natural cycles are real, but climate change is stretching those natural cycles,” Hayhoe said.

MANDEL NGAN via Getty Images

Both Obama and Hayhoe suggested it may be possible to persuade climate deniers by making it a moral issue.

Hayhoe said the way to reach skeptics “is to connect this issue to what’s already in our hearts.”

Obama argued that the issue can transcend traditional political lines.

“There are people generally on the conservative side of the spectrum that care deeply about this planet that God made,” Obama said. “It requires us to reach out to sportsmen and hunters and fishermen who may not agree on Second Amendment issues, but they sure like and understand the notion they got a forest where they can go out.”

“Although they probably don’t want to be mauled by a grizzly bear,” the president quipped, referencing DiCaprio’s most recent film “The Revenant.” “That looks a little severe.”

Obama spent much of the panel contemplating his environmental legacy, which includes designating more national monuments and protecting more public land than any previous president. In promoting the issue of conservation, he has often cited the nostalgia he feels for the great outdoors and “the idea that my grandkids might not see something that I’ve seen.”

“There are many entry points into this issue, and we have to use all of them to get people to care about this,” Obama said. “But at the end of the day, everyone cares about their kids and grandkids and the kind of world we pass on to them.”