In an interview published on Sunday, President Obama said that the nomination of Sarah Palin as the Republican vice presidential nominee in 2008 marked the beginning of a shift in the Republican party that led to the rise of Donald Trump.

“I see a straight line from the announcement of Sarah Palin as the vice-presidential nominee to what we see today in Donald Trump, the emergence of the Freedom Caucus, the tea party, and the shift in the center of gravity for the Republican Party,” Obama told New York Magazine.

“Whether that changes, I think, will depend in part on the outcome of this election, but it’s also going to depend on the degree of self-reflection inside the Republican Party,” he continued. “There have been at least a couple of other times that I’ve said confidently that the fever is going to have to break, but it just seems to get worse.”

Obama made the comments while discussing congressional Republicans’ blanket opposition to working with him. He said that “what you saw was just a series of moments as opposed to one big moment where Republican leadership felt their politics, both in terms of recapturing the majority in Congress but also protecting themselves from what would become the tea-party wing of the party, prevented them, in their minds, from working with this administration in any kind of constructive way.”

He said that legislating is no longer about compromise but about gaining as many votes in each chamber of Congress as possible and influencing public opinion.

“I have very cordial relations with a lot of the Republican members. We can have really great conversations and arrive at a meeting of the minds on a range of policy issues, but if they think they’re going to lose seats or that they’re going to lose their own seat because the social media has declared that they sold out the Republican Party, then they won’t do it. That dynamic, I think, is going to be harder and harder to change because of the balkanization of the media, because of political gerrymandering,” he said.

“It is evident that Republicans pay a price for that narrowing of their perspective in presidential elections, but for the individual member of Congress in a 60 percent Republican district in Oklahoma or Arkansas or anyplace in the country, that doesn’t matter,” Obama continued. “What matters is that all his constituencies or her constituencies are watching Fox News and listening to Rush, and they’re going to pay a price if they’re seen as being too cozy with a Democratic president.”