President Barack Obama has attacked Donald Trump and his recent comments about sexually assaulting women, saying they would be intolerable even for someone applying for a job at a 7-Eleven convenience store.

At a rally where he was campaigning on behalf of Democratic candidate Hillary Clinton, Mr Obama also urged senior Republicans to formally withdraw their endorsement of Mr Trump as the presidential candidate.

Many top Republicans have distanced themselves from Mr Trump over a video in which he boasted of groping women, and the candidate has denounced the party’s top leadership, including House Speaker Paul Ryan

People waited for many hours in the sun to hear the president speak (AP)

Mr Trump has accused the leadership of disloyalty, and said Mr Ryan whom he described as a “weak and ineffective” leader.

Addressing a campaign rally in Greensboro, North Carolina, on Tuesday evening, Mr Obama referred to Mr Trump’s remarks saying: “Now you find a situation in which the guy says stuff that nobody would find tolerable if they were applying for a job at 7-Eleven.”

The president added: “You don’t have to be a husband or a father to say that’s not right. You just have to be a decent human being.”

According to the BBC, Mr Obama also questioned how senior Republican politicians could still want Mr Trump to be president.

Loading....

“The fact is that now you’ve got people saying ‘We strongly disagree, we really disapprove... but we’re still endorsing him’. They still think he should be president, that doesn’t make sense to me,” he told the crowd.

Several hecklers interrupted Mr Obama’s address, but he was unmoved.

“This is democracy at work. This is great,” he said, as the hecklers were escorted from the venue by security officials. He told some to “get their own rally”.

Mr Obama said Mr Trump “doesn’t have the temperament, or the judgment, or the knowledge, or apparently, the desire to obtain the knowledge, or the basic honesty that a president needs to have”.

He added: “And that was true even before we heard about his attitude toward women.”

Meanwhile, a defiant Donald Trump said Republicans were coming at him “from all sides”

Nearly half of the 331 incumbent Republican senators, House members and governors have condemned the lewd remarks and about ten have called for Mr Trump to drop out of the race, according to Reuters news agency.

On Monday, Mr Ryan said he would not defend Mr Trump over the remarks.

He told fellow House Republicans he would instead focus on congressional elections to ensure Republicans could maintain legislative control.

Mr Trump fired back in a string of tweets, saying the “shackles” had been removed, allowing him to “fight for America the way I want to”. He said he neither wanted nor needed Mr Ryan's support.

Mr Trump also took aim at US Senator John McCain of Arizona, the 2008 Republican presidential nominee, who said on Saturday that he could not vote for Trump.