Editor’s note: The Post has learned that this article contained several passages that were largely duplicated, some without attribution, from a story published by Slate. Post policy forbids the unattributed use of material from other sources.

It was a bizarre example of modern politics overlapping with pop culture: The president quote-tweeted Kanye West, saying it was “very cool!” that the entertainer had called Trump “my brother” and that he thought the two shared “dragon energy.”

The moment was especially confusing for those who’ve followed — or have tried to follow — West’s zigzagging political allegiances since 2005, when he criticized then-President George W. Bush’s response to Hurricane Katrina, saying Bush “doesn’t care about black people.” West’s comments came a year after he achieved fame with the release of his debut album, “The College Dropout.”

West only recently returned to Twitter after nearly a year away and brought renewed attention to himself by voicing his feelings about the president. On Wednesday, the entertainer told his Twitter followers that he was fond of Trump — the president who called African and other nations “s---hole countries,” among other things  — writing that “you don’t have to agree with trump but the mob can’t make me not love him.”

“We are both dragon energy,” West wrote. “He is my brother. I love everyone. I don’t agree with everything anyone does. That’s what makes us individuals. And we have the right to independent thought.”

The cultural icon then scaled back a bit — but not too far back — after explaining that his wife, Kim Kardashian, had suggested he “make this clear to everyone.”

“I don’t agree with everything Trump does,” West said in the tweet. “I don’t agree 100% with anyone but myself.”

He tweeted a picture of a red “Make America Great Again” hat signed by Trump. (Trump liked that tweet, too.) Then he tweeted a picture of his phone displaying a screenshot of Trump’s tweet, which had been posted on Instagram.

He also tweeted a possible explanation for his admiration of Trump.

“Obama was in office for eight years and nothing in Chicago changed,” he wrote.

West has long been politically vocal. That’s clear from his song lyrics:

“I say f--- the police, that’s how I treat ’em / We buy our way out of jail, but we can’t buy freedom.” (“All Falls Down,” 2004)

“I know people wouldn’t usually rap this / But I got the facts to back this / Just last year, Chicago had over 600 caskets / Man, killing’s some wack s---” (“Everything I Am,” 2007)

“And I’ll never let my son have an ego / He’ll be nice to everyone wherever we go/ I mean I might even make him be Republican / So everybody know he love white people” (“New Day,” 2011)

“Hands up we just doing what the cops taught us / Hands up we just doing what the cops taught us” (“Feedback,” 2016)

What’s not so clear is what, exactly, his ideologies are. He grew up with a left-leaning foundation, as his father was a former Black Panther, and his late mother was a professor at a historically black college. But his recent tweets suggest he’s become increasingly right-leaning, making him a target of the left.

Here’s a look at some of his past entanglements with politics:

2005: West suggests Bush is a racist

On Sept. 2, 2005, about four days after Hurricane Katrina ripped through New Orleans, West gathered with celebrities Leonardo DiCaprio, Claire Danes and Lindsay Lohan for “A Concert for Hurricane Relief,” televised on NBC, which raised a reported $50 million, according to Slate. West, frustrated by the government’s failure to help the hurricane’s victims, looked straight into a camera and said on live TV, “George Bush doesn’t care about black people.”

West stood by his statement for several years, until, 10 years later, Bush called it the “all-time low” point of his presidency. West subsequently apologized to Bush, who forgave him.

The show’s producers told Slate in 2015 that West going off script was a historic moment. But that’s not how they viewed it back then.

“I remember hearing the words that were coming out of his mouth and looking down at the script and [thinking], ‘This is not — this is not going well,’ ” Frank Radice, the show’s senior producer, told Slate. Radice then had a second thought. “I remember saying [to someone], ‘It was good TV.’ ”

2009 (and again, in 2012): Obama calls West a ‘jackass’

Former president Barack Obama dropped the epithet not once, but twice. The first time was after West famously stormed the stage at the 2009 MTV Video Music Awards, interrupting Taylor Swift’s acceptance speech for her Best Female Video win to say that Beyoncé should have won instead. Obama called West a “jackass” behind the scenes of a CNBC interview, a video of which was leaked and went viral on YouTube.

Kanye responded a year later in an interview with “XXL.”

“Obama has way more important stuff to worry about than my public perception. He was trying to pass the health-care bill. And if he said that to relate to the room or lighten the room up and the whole mood, then I’d be more than happy to be the butt of all of his jokes if it in some way helps his overall mission,” he said.

“I’m a soldier of culture. I’m resilient. I’m sure I’ll still beat him in basketball,” he added.

Then, in 2012, Obama again called West a “jackass,” after Atlantic Monthly reporter David Samuels asked him during an interview, “Kanye or Jay-Z?”

“Jay-Z,” Obama told Samuels. “Although I like Kanye. He’s a Chicago guy. Smart. He’s very talented.”

Samuels then asked, “Even though you called him a jackass?”

“He is a jackass,” Obama answered. “But he’s talented.”

2016: West’s wife endorses Hillary Clinton

In 2015, West’s wife, Kardashian, declared her allegiance to Clinton via selfie. A year later, reports emerged that the reality TV star was thinking of voting for Trump, instead, after Caitlyn Jenner — who was married to Kardashian’s mother and spoke at the Republican Party’s convention — encouraged her to reconsider.

But Kardashian stuck with Clinton, who she said supported the issues Kardashian cared about, such as “gun control and protecting women’s rights to safe and legal abortion.”

“I’m with her,” Kardashian wrote on her website. “I believe Hillary will best represent our country and is the most qualified for the job. This year, I’m not just voting for myself, but also for my children, and I took that into careful consideration when I made my decision.”

Saturday: West embraces Candace Owens

Less than a week after returning to Twitter, West appeared to endorse red-pill YouTuber Candace Owens, an African American Trump supporter who regularly criticizes Black Lives Matter. When activists protested a speech she gave last week at the University of California at Los Angeles, she accused them of embracing victimhood by focusing on slavery and the systemic racism of the past, according to The Washington Post’s Eugene Scott.

“It’s embarrassing. You’re not living through anything right now. You’re overly privileged Americans,” she said.

She later tweeted about the protesters: “They’re a bunch of whiny toddlers, pretending to be oppressed for attention.”

West on Saturday tweeted, “I love the way Candace Owens thinks.”

“It is not clear what West’s intent was in voicing support for her,” Scott wrote. “But if the hope was that West’s endorsement would grant her worldview some validation among black voters, particularly millennials and those who supported the South Side Chicago native long before he moved to Southern California to join forces with Kim Kardashian, perhaps it was misplaced.”

On Sunday, West tweeted nine videos from Scott Adams, who became famous for creating the cartoon “Dilbert,” and who also claimed that rape is a “natural instinct” of men and that society is a “virtual prison for men’s natural desires.”

Wednesday: Wait! West loves Hillary, too.

Soon after West posted his initial tweet supporting Trump on Wednesday, he decided to give a shout-out to Hillary Clinton, as well.

But West continued to praise Trump. If his pro-Clinton tweet was an attempt at toeing the line, it didn’t appear to work.

Read more: 

Rapper Kanye West calls Trump ‘my brother’ — ‘very cool!’ Trump responds

‘The mob can’t make me not love him’: How Kanye West joined the pro-Trump Internet

Kanye West’s 6 ridiculous Twitter eras, from water-bottle hate to ‘Stop playing chess with life’