Donald Trump railed against several of his Republican primary opponents on Wednesday night for declining to endorse him in the general election, going so far as to suggest "they should never be allowed to run for public office again."

"I have guys out there and if you really think about it, they're really sore losers," Trump told supporters during a campaign rally in Bangor, Maine.

Trump was referring to at least seven GOP presidential hopefuls who signed a loyalty pledge to support their party's presidential nominee and have since declined to do so. Such candidates include former Florida Gov. Jeb Bush, Wisconsin Gov. Scott Walker, Texas Sen. Ted Cruz, businesswoman Carly Fiorina and Ohio Gov. John Kasich.

"It was a rough campaign," he conceded. "They say it was the roughest campaign ever in the history of Republican politics, but what you do is you go to sleep for a couple of days and you wake up and you honor [the pledge]."

The presumptive Republican nominee continued, claiming that he considered the pledge to be "legally binding" and assuring his supporters that he would have honored it had Kasich, Cruz or any other GOP candidate clinched the nomination instead.

"There are people I don't like or particularly respect on that stage, but I would have honored it," Trump said. "I wouldn't have gone crazy, yelling it from the loudest building."

Trump himself routinely changed his position on the pledge during the primary, threatening more than once to leave the Republican party and launch an indepedent bid.

"But you know what, we have people who haven't honored the pledge and that's a terrible thing," he told the crowd. "They signed a pledge saying they will abide, they will back the candidate of the party and now they sit back and ... they broke their word."

"In my opinion, they should never be allowed to run for public office again because what they did is disgraceful," he later added.

Some of the billionaire's former opponents have said that in addition to declining to endorse Trump, they will not attend next month's GOP convention.