After the Republican ticket of Mitt Romney and running mate Paul Ryan lost the 2012 presidential election, the Republican National Committee conducted an autopsy that examined, among other things, the GOP's challenge in winning black voters.

“Many minorities wrongly think that Republicans do not like them or want them in the country,” the report said. “We need to campaign among Hispanic, black, Asian, and gay Americans and demonstrate we care about them, too. We must recruit more candidates who come from minority communities.”

But when Ryan (R-Wis.) leaves Congress at the end of his term, including three years as House speaker, one of the things he will be remembered for most — especially among black voters — is repeatedly supporting a president whom even he had to call out for racist rhetoric.

During the 2016 campaign, when then-candidate Donald Trump accused an Indiana-born judge of bias in a civil case against Trump because of his Mexican heritage, Ryan said the attacks on a federal judge constituted “the textbook definition of a racist comment.”

“I disavow these comments — I regret those comments that he made. I think that should be absolutely disavowed. It’s absolutely unacceptable,” the speaker said of Trump's comments while visiting a predominantly black neighborhood in Southeast Washington to discuss GOP anti-poverty proposals.

And when Trump as president equated white supremacists in Charlottesville with counterprotesters last year after a woman died when a white supremacist rammed his car into a crowd, Ryan initially voiced disagreement with the president but didn't do much beyond publishing a 500-word Facebook post that didn't even mention Trump by name. In the post, Ryan said: “There is no moral relativism when it comes to neo-Nazis. We cannot allow the slightest ambiguity on such a fundamental question.”

But aside from saying that he disagreed with the president, Ryan never gave black Americans much confidence that he and the GOP, which  spent significant time reevaluating why Ryan and Romney lost the black vote in 2012, could be trusted to consistently push back against Trump on matters of race in America.

Well before the 2016 presidential election, though, Ryan himself was accused of using dog whistles about black Americans in inner-city neighborhoods that weren't too different from the ones used by Trump during his outreach to black voters.

In 2014, Rep. Barbara Lee (D-Calif.) accused Ryan of making “a thinly veiled racial attack” after he linked poverty to “this tailspin of culture, in our inner cities in particular, of men not working and just generations of men not even thinking about working or learning the value and the culture of work.”

And while Ryan, a prolific fundraiser, repeatedly tapped into the energy and perhaps anger of the tea party movement to help Republicans win back the House in 2010, he was accused of being silent on the birtherism conspiracy theories about President Barack Obama that ran rampant in the movement. Birtherism and other concerns may be why nearly 3 in 10 Americans viewed racial prejudice as underlying the tea party movement, according to a 2010 Washington Post-ABC poll.

Nearly 9 in 10 black Americans say they face a lot of discrimination, according to a Public Religion Research Institute poll. But less than one-third of Republicans believe blacks face a lot of discrimination in society, according to PRRI. And that probably costs the GOP some votes it could win.

An AP/NORC poll said 27 percent of blacks self-identify as conservative, but no Republican running for president or Congress has won anything close to 27 percent of the black vote since Ryan's ascendance in the GOP.

And it's not likely that will change anytime soon. To be sure, Ryan is not to blame for black Americans' lack of support for the GOP. Republicans were losing the black vote before he came to Washington.

But during his speech announcing that he would not seek reelection, Ryan said, “I like to think I've done my part, my little part in history, to set us on a better course.”

It's not clear that black voters agree.

Eleven percent of black Americans approve of the job Republicans in Congress are doing, according to the latest Quinnipiac University poll. And 8 percent of black Americans approve of the job Trump is doing, according to the poll.