They’re two of the most powerful African-American politicians in the land. And by most accounts, President Obama and Rep. Charles Rangel hate each other.

The most recently revealed salvo in their war of words — Obama’s assertion that Rangel is a “hack,” according to the political tome “Double Down” — is just one element of a long-dysfunctional relationship.

Rangel supported Hillary Clinton in the 2008 Democratic primary, but the seeds of mutual disdain were planted before that, according to Democratic insiders and staffers for both pols.

“There’s a cultural difference. There was always a pecking order of who [Rangel] perceived as being part of the struggle during the civil-rights movement,” said Vincent Morgan, a Rangel aide from 2001 to 2004 who campaigned for Obama in 2008 and ran against the Harlem congressman in 2010.

“The younger people were constantly reminded that they were the beneficiaries. Every conversation with him was a one-sided conversation. It was like, ‘That’s a good idea, but you haven’t been in the game long enough.’ ”

That worldview, and his loyalty to the Clintons, motivated Rangel, a Korean War veteran who has served in Congress for 44 years, to dismiss Obama in 2008.

“There’s just no question in my mind that Hillary would be in a better position than a freshman senator,” he was quoted as saying in January 2008. “This ain’t no time for a beginner.’’

But once Obama surged ahead of Clinton, Rangel took credit for urging Clinton not to challenge Obama’s nomination. The damage had been done, though, and it wasn’t all about Hillary.

“It’s a little more style than it is politics,” said one Harlem insider and Rangel confidant. “There are members of Congress who backed Hillary who Obama now has a decent relationship with. The thing with Charlie — a lot of it is style. There’s nobody more old-school than Charlie. And Obama is not.”

The result: Rangel didn’t get the kind of access to the president he assumed was his right as chairman of the House Ways and Means Committee.

“You know who’s had more access to the White House than Rangel? Al Sharpton,” the source said. “They went with Al.”

When Rangel faced censure for paying below-market rates on four Harlem apartments and failing to pay taxes on his Dominican Republic cottage, Obama didn’t hesitate to throw him under the bus.

“He’s somebody who’s at the end of his career,’’ Obama told CBS News in July 2010. “I’m sure that what he wants is to be able to end his career with dignity, and my hope is that it happens.’’

Their animus blew up when Obama tried to bar Rangel from a Harlem event in March 2011.

“Remember the $30,000-a-plate fund-raiser Obama had at the Red Rooster a couple of years back,” said one Harlem insider. “Charlie’s people reached out and asked, ‘Where’s Charlie’s complimentary entrée to the event?’ And the answer was, ‘There is no complimentary entrée.’ This is in Harlem — Charlie’s home turf. His office was furious. And what Charlie decided to do was say, ‘I’m coming anyway.’ ”

In recent months, Rangel has been one of Obama’s most prominent Democratic critics. He has railed against Obama’s stance on Syria, IRS reviews of conservative organizations and, perhaps most of all, the rollout of ObamaCare.

“It’s screwed up,” he said.