WASHINGTON (AP) — Republican presidential candidates Donald Trump and Ben Carson are threatening to boycott the next GOP debate over its proposed format, underscoring a rare political alliance between the leading outsider candidates.

In a joint letter to CNBC's Washington bureau chief Thursday, the billionaire businessman and retired neurosurgeon told the hosting network they will not appear at the Oct. 28 debate unless it's capped at two hours with commercials and the candidates are allowed to speak directly to the camera at its opening and close.

Ed Brookover, a senior Carson campaign strategist, said the campaigns were caught off-guard when CNBC sent them an email Wednesday outlining debate rules that the candidates had not agreed to. The agenda included two hours of debate time plus four commercial breaks and no opening or closing statements.

"We thought that the only way to make sure that candidates are heard early and late was not to rely on the moderators," he said, referring to the push for opening and closing statements.

The letter came after a heated call between the campaigns and the Republican National Committee over the debate's format.

Neither Trump campaign manager Corey Lewandowski nor Trump campaign spokeswoman Hope Hicks immediately responded to requests for comment. But Trump took to Twitter on Thursday to express his anger.

"The @GOP should not agree to the ridiculous debate terms that @CNBC is asking unless there is a major benefit to the party," he said. He accused the network of trying to lengthen the debate in order to sell more ads. Trump has complained often about the second debate, hosted by CNN, which stretched on for a marathon three hours.

CNBC spokesman Brian Steel said in a statement that the network was aiming to host "the most substantive debate possible," but was open to changing the format.

"Our practice in the past has been to forego opening statements to allow more time to address the critical issues that matter most to the American people," he said. "We started a dialogue yesterday with all of the campaigns involved and we will certainly take the candidates' views on the format into consideration as we finalize the debate structure."

Trump and Carson have developed a unique rapport, with little fighting between the two despite the fact that Carson has been gaining on Trump in opinion polls.

The topic of debates has been a contentious one throughout the campaign, with both Democrats and Republicans sparring over who is included on stage and how much time they're allotted.

During the first Democratic debate this week, former Virginia Sen. Jim Webb complained repeatedly about how little time he had to answer questions. He said Thursday he felt the debate had been "rigged in terms of who was going to get the time on the floor."