Supporters look on as U.S. Republican presidential candidate Ted Cruz (R-TX) speaks at a campaign event at Woodrow Wilson Middle School in Terre Haute, Indiana, April 24, 2016. REUTERS/Aaron P. Bernstein

In an unprecedented effort to stymie Republican front-runner Donald Trump, his two remaining rivals, Sen. Ted Cruz of Texas and Ohio Gov. John Kasich announced late Sunday that they would cede certain states to each other. The move is aimed at preventing Trump, who has had a massively successful run in recent weeks, from clinching the GOP nomination.

“Having Donald Trump at the top of the ticket in November would be a sure disaster for Republicans. Not only would Trump get blown out by Clinton or Sanders, but having him as our nominee would set the party back a generation,” Cruz’s campaign manager Jeff Roe said in a statement.

“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.”

In a separate statement released almost simultaneously, the Kasich campaign said that preventing Trump from winning the Indiana primary next Tuesday was “critical” to keep his delegate count under the 1,237 votes needed to clinch the nomination during the party’s national convention in July.

If no candidate secures the required number of delegates, the Republican Party may witness a contested convention, which may lead to a second ballot where delegates are not bound by the results of their states’ primaries and caucuses. Currently, Trump has 845 delegates, Cruz has 559 and Kasich is trailing at 148.

“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,” Kasich’s chief strategist John Weaver said in the statement. “In turn, we will focus our time and resources in New Mexico and Oregon, both areas that are structurally similar to the Northeast politically, where Gov. Kasich is performing well.”

Oregon votes on May 17 and New Mexico voters are scheduled to cast their ballot on June 7.

The alliance between Cruz and Kasich, which comes less than a week after Trump won 89 of New York’s 95 delegates, was immediately decried by the New York businessman, who accused his rivals of being “mathematically dead and totally desperate.”