WASHINGTON (Reuters) - Republican White House rivals Ted Cruz and John Kasich announced a deal on Sunday to stay out of each other’s way in some upcoming state primaries in hopes of blocking front-runner Donald Trump from winning the party’s presidential nomination.

Cruz’s campaign said in a statement he would focus on the Indiana and give Kasich a clearer shot in Oregon and New Mexico, states where the Ohio governor expects to do well. Kasich, in turn, agreed to shift resources west and away from Indiana.

The Indiana primary is on May 3, Oregon’s is May 17 and New Mexico’s June 7.

Trump has won the most state nominating contests, but he has a tough path to earn the 1,237 delegates needed to secure the nomination. The Cruz and Kasich campaigns believe their agreement to cede states where the other candidate appears strong could help limit Trump’s ability to win more delegates.

Some Republican strategists who oppose Trump have been calling for such a deal for weeks. The question for Cruz and Kasich is whether their agreement is too late.

If no candidate has enough support by the first vote at the Republican National Convention in July, many delegates will be allowed to switch sides on subsequent ballots.

Cruz campaign manager Jeff Roe said Trump, who has offended women, Hispanics and other groups with controversial statements, would lose a general election contest against the eventual Democratic nominee in the Nov. 8 election.

Slideshow ( 3 images )

“Our goal is to have an open convention in Cleveland, where we are confident a candidate capable of uniting the party and winning in November will emerge as the nominee,” Kasich chief strategist John Weaver said in a statement.

Late Sunday, Trump tweeted his reaction to the deal: “Wow, just announced that Lyin’ Ted and Kasich are going to collude in order to keep me from getting the Republican nomination. DESPERATION!”

Trump has frequently complained that the Republican Party’s nominating process is “rigged” against him because establishment party members oppose him. Party officials argue that the delegate selection rules have been known for some time.

The stop-Trump group #NeverTrump welcomed news of the pact.

“Whether you support Ted Cruz or John Kasich, a second ballot at the Convention is imperative to stopping Donald Trump. We’re happy to see the Kasich and Cruz campaigns strategically using their resources to deny Donald Trump delegates where they are in the strongest position to do so,” said the group’s senior adviser, Rory Cooper.