The presidential campaigns of Texas Sen. Ted Cruz and Ohio Gov. John Kasich announced late Sunday that they were coordinating their efforts in three upcoming primary states in an extraordinary attempt to prevent Republican front-runner Donald Trump from clinching the GOP nomination before this summer's convention.

In a pair of simultaneously released statements, the campaigns announced that Kasich would pull out of Indiana to give Cruz "a clear path" ahead of that state's winner-take-all primary May 3, while the Cruz campaign will "clear the path" for Kasich in Oregon, which votes May 17, and New Mexico, which votes June 7.

"Having Donald Trump at the top of the ticket in November would be a sure disaster for Republicans," Cruz's campaign manager, Jeff Roe, said. "To ensure that we nominate a Republican who can unify the Republican Party and win in November, our campaign will focus its time and resources in Indiana and in turn clear the path for Gov. Kasich to compete in Oregon and New Mexico, and we would hope that allies of both campaigns would follow our lead."

The arrangement marks a sharp reversal for Cruz's team, which aggressively opposed the idea of a coordinated anti-Trump effort as recently as late last week. Yet it underscores a bleak reality for the billionaire businessman's Republican foes: Time is running out to stop him.

Trump responded on Twitter shortly before midnight Monday.

A statement from the Trump campaign called the move "a horrible act of desperation from two campaigns who have horribly failed."

The Kasich campaign confirmed to Fox News that it had canceled two Indiana campaign events scheduled for Tuesday. As recently as three days ago Kasich's campaign announced investments in Indiana, including the opening of two offices and the creation of a campaign leadership team.

Campaign manager John Weaver said in his statement that the Kasich team hoped to perform well in Oregon and New Mexico, which Weaver said were "structurally similar" to northeastern states where Kasich performed well earlier in the cycle.

"Our goal is to have an open convention in Cleveland," Weaver added, "where we are confident a candidate capable of uniting the party and winning in November will emerge as the nominee."

The announcement came less than 48 hours before voting begins across five Northeastern states where the New York billionaire is poised to add to his already overwhelming delegate lead. Trump campaigned Sunday in Maryland, which will vote on Tuesday along with Rhode Island, Connecticut, Pennsylvania and Delaware.

Trump needs 1,237 delegates to win the Republican nomination. If he falls short, the national Republican gathering in July will evolve into a rare contested convention.

At a rally in Hagerstown, Md., Trump stressed repeatedly that he expects to win the 1,237 delegates needed in the first round of voting to stave off a contested convention.

"I only care about the first. We're not going for the second and third and fourth and fifth," said Trump.

Even before the plan was announced, Cruz had all but abandoned the Northeastern states in favor of Indiana, which holds its primary on May 3. Both Cruz and Kasich had cast the state as a critical turning point.

"Keeping Trump from winning a plurality in Indiana is critical to keeping him under 1,237 bound delegates before Cleveland," Kasich's campaign said Sunday. "We are very comfortable with our delegate position in Indiana already, and given the current dynamics of the primary there, we will shift our campaign's resources west and give the Cruz campaign a clear path in Indiana."

Indiana will award 57 delegates to the winner of its primary. Oregon and New Mexico have 28 and 24 proportionately awarded delegates at stake, respectively. 

Fox News' Dan Gallo and the Associated Press contributed to this report.