After weeks of squabbling, attempted coordination, and rebuffs, Ted Cruz and John Kasich have announced they are, in fact, joining their efforts to block GOP front-runner Donald Trump in the upcoming primaries.

In simultaneous statements issued late Sunday, the campaigns announced that Cruz would focus his campaign’s efforts on Indiana, while leaving contests in New Mexico and Oregon to Kasich. Both Cruz and Kasich are mathematically incapable of securing the GOP nomination on the first ballot, and each must stop Trump from reaching 1,237 delegates if they hope to stand a chance at a contested convention.

The Kasich campaign first approached the Cruz campaign about coordinating their efforts after the Houston debate in late February, only to be rejected. Last week, at the spring meeting of the Republican National Committee in Hollywood, Fla., where both Cruz and Kasich and their top strategists made presentations, Cruz campaign manager Jeff Roe approached Kasich senior strategist John Weaver about cooperating in the coming races, according to a person familiar with the arrangement. The details were then sorted out in a series of telephone conversations over the weekend.

“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,” Roe said in a statement.

Weaver echoed the comments in a statement of his own. “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. We would expect independent third-party groups to do the same and honor the commitments made by the Cruz and Kasich campaigns,” he said.

The three races could be pivotal to stopping Trump from reaching a majority of convention delegates on the first ballot. Indiana’s May 3 primary is winner takes all by congressional district and statewide, meaning Trump would earn none of the 57 delegates if Cruz is able to secure a simple plurality. New Mexico and Oregon are both proportional contests — on 24 delegates June 7 and 28 delegates May 17, respectively — but the campaigns believe their more moderate demographics favor Kasich as a Trump alternative.

The move to harmonize their efforts fulfills a long-standing wish of anti-Trump forces within the GOP, who have been calling for a more strategic approach than what has transpired in recent primaries and caucuses. Each campaign has argued that the other was spoiling their efforts to take on Trump, encouraging the other to drop out of the race. Their lack of coordination allowed Trump to secure more delegates than he would otherwise, and saw the Cruz and Kasich campaigns, and affiliated outside groups, spend millions attacking one another rather than the front-runner.

The announcement comes days after Trump won 90 of New York’s 95 delegates in a rout, and days before he is expected to have another strong showing in primaries in Pennsylvania, Connecticut, Maryland and Delaware.

Both campaigns said they would aggressively compete in the remaining eight contests.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.