Democratic presidential candidate Bernie Sanders speaks in Des Moines, Iowa, last month. ( Scott Olson/Getty Images)

As part of his bid to become the next president, Bernie Sanders took part in a “soul-food sit-down” with Comedy Central’s Larry Wilmore that ended with the White House hopeful donning a baseball cap declaring that “Black-Eyed Peas Matter.”

The segment, recorded Friday and broadcast Monday on “The Nightly Show,” was the latest attempt by Sanders to broaden his exposure as he competes for the Democratic nomination against Hillary Rodham Clinton.

Sanders, an independent senator from Vermont, gamely played along as Wilmore, an African American comedian, asked deadpan questions about Sanders’s status as a “democratic socialist,” his advancing age and his outreach to black voters -- all while the two of them ate soul food.

[Bernie Sanders pays a visit to Stephen Colbert’s ‘Late Show’]

“Do you think America is ready for the first socialist president?” Wilmore asked.

“Yeah, I do,” Sanders replied, suggesting that the United States could learn a lot from Scandinavian countries where health care and college education are free.

Wilmore pressed him. “Do you think people are afraid of of the word ‘socialism?' Are you going to take my deviled egg? Is that what it means?”

[Two days later, Sanders draws five times as many people as Clinton to event at same university]

Turning to Sanders’s age, Wilmore noted that the senator is now 74 and would be the oldest U.S. president to take office.

“Would you be comfortable with a, let’s say, ‘Weekend at Bernie’s’ situation, to get you through the rest of your administration?” Wilmore asked.

It was a reference to a 1989 movie in which two employees of an insurance company go to great lengths to convince people that their recently deceased boss is still alive.

“The good news is I’ve been blessed with good health,” Sanders said.

Nevertheless, Wilmore handed Sanders a pair of dark sunglasses, similar to those placed on the dead boss in the movie, which Sanders slipped on.

Wilmore also noted that a couple of Sanders’s campaign events had been disrupted by activists from Black Lives Matter, an organization trying to elevate police brutality and other issues during the 2016 presidential cycle.

[VIDEO: Black Lives Matter protesters disrupt Sanders rally]

“I’ll be honest with you, I hate it when black people interrupt me,” Wilmore said, before asking: “What do you think would be a good way to get black people to ‘Feel the Bern?’”

“We’re going to do everything we can to end institutional racism in this country and more,” Sanders said. “We’ve also got to deal with real criminal justice reform.”

At that point, Wilmore said that the candidate “making all the noise right now” is Donald Trump, the real estate mogul who’s become the Republican presidential frontrunner.

Wilmore said part of Trump’s appeal is his hat, which says, “Make America Great Again.” He suggested Sanders get his own hat and presented him with one such idea: a hat emblazoned with “Black-Eye Peas Matter.”

“And you think this will take me over the top?” Sanders asked, before pulling it on his head.

The segment comes as Sanders is trying to reach out to African-American voters, who will become a key component of the nomination fight following contests in Iowa and New Hampshire, which are largely white.