Pharrell and Bernie Sanders make this case for Clinton in N.C.

Heidi M Przybyla
Recording artist Pharrell Williams, left, Hillary Clinton and Sen Bernie Sanders (I-VT), right, greet supporters during a campaign rally November 3, 2016 in Raleigh, North Carolina.
Justin Sullivan | Getty Images

Hip-hop artist Pharrell Williams made the case for a female president in a way that Hillary Clinton probably is unable to.

At a Thursday night rally, Williams joined the Democratic presidential nominee and her former primary rival, Sen. Bernie Sanders, in an effort to boost voter turnout in a critical battleground state.

"It makes me angry when people say she can't lead our country because she's a woman. How dare anyone question a woman's ability. Every person on this planet was brought into this world by a woman," Williams said to applause from the audience of more than 5,000 supporters.

More from USA Today:
Poll: Trump chipping away at Clinton's lead
Trump aide condemns anti-Semitic heckler
Trump: NBC releasing the 'Access Hollywood' tape was an 'illegal act'

"Women carry so much every day, including us for nine months," Pharrell said. "Don't we call the planet Mother Earth?" Williams told the crowd at the Coastal Credit Union Music Park at Walnut Creek amphitheater.

The three took the stage to Farrell's hit song Happy. Clinton has avoided discussing her own gender on the campaign trail, instead focusing on the need to increase opportunity for all women. Regardless, Trump has accused her of playing the "gender card."

Williams is obviously neither a woman nor a politician. It explains why he may have been able to make a case for having a woman hold the nation's highest office in a way that Clinton can't.

Recording artist Pharrell Williams speaks during a campaign rally with Democratic presidential nominee Hillary Clinton.
Justin Sullivan | Getty Images

When it comes to controlling the nuclear codes, he said, "for once, I'd like to see it commanded by a woman who knows what it's like to physically bring a life into this world … before she decides to take millions of them out," said Williams.

Sanders also made the case for a Clinton presidency, saying she would raise the minimum wage, reverse the Supreme Court's Citizens United decision, advocate for equal pay for women and paid family leave and take steps to address global warming. He warned Trump would throw 20 million people off health insurance by repealing Obamacare and said Trump's campaign has been built around "bigotry."

"I worry very, very much that this country is slipping into an oligarchical form of society where a handful of billionaires control our economic and political life," said Sanders.

Prior to the rally, Clinton was seen chatting on the tarmac with Williams after her plane landed. Clinton's visit to North Carolina occurred the same day Trump held rallies in Concord and Selma in Johnston County. In an awkward intersection, Clinton's motorcade passed Trump's plane on the tarmac as the two arrived within minutes of each other.

During his remarks, Williams said Clinton has made a "personal commitment" to him to fix certain "wrongs," including a 1994 crime bill that's led to the mass incarceration of African American males.

"This country hasn't always been fair to all people," he said. "But I think Hillary's gonna help fix these wrongs," said Williams.

"I'm calling on all the women in this nation, I don't care if your Democrat, Republican, Libertarian," said Williams. "If you are a female, think about what you can do on Nov. 8."

Follow CNBC International on Twitter and Facebook.