The Kasich campaign will give Mr Cruz "a clear path in Indiana". In return, the Cruz campaign will "clear the path" for Mr Kasich in Oregon and New Mexico.
"Having Donald Trump at the top of the ticket in November would be a sure disaster for Republicans," Mr Cruz's campaign manager Jeff Roe said in a statement explaining the new plans.
"Not only would Trump get blown out by Clinton or Sanders, but having him as our nominee would set the party back a generation."
Mr Kasich's chief strategist John Weaver added: "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."
The arrangement marks a sharp reversal for Mr Cruz's team, which aggressively opposed the idea of a co-ordinated 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.
The announcement came less than 48 hours before voting begins across five north-eastern states where New Yorker Mr Trump is poised to add to his already overwhelming delegate lead.
He campaigned on Sunday in Maryland, which will vote on Tuesday along with Rhode Island, Connecticut, Pennsylvania and Delaware.
Speaking to several thousand people in an aircraft hangar in Hagerstown, Maryland, Mr Trump stressed repeatedly that he expected 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," he said.
Even before the plan was announced, Mr Cruz all but abandoned the north-eastern states in favour of Indiana, which holds its primary on May 3.
Both Mr Cruz and Kasich had cast the state as a critical turning point. Under the terms of the new agreement, however, Mr Kasich will allow Mr Cruz take on Mr Trump without interference.
As recently as three days ago Mr Kasich's campaign announced investments in Indiana, including the opening of two offices and the creation of a campaign leadership team. And he had planned to campaign there on Tuesday, with a town hall and gathering in Indianapolis to watch the results of the primaries. Those events have now been cancelled.
As Mr Kasich backs out of Indiana, Mr Cruz promised to not compete in primary contests in Oregon on May 17 and New Mexico on June 7.
"We will focus our time and resources in New Mexico and Oregon, both areas that are structurally similar to the north east politically, where Governor Kasich is performing well," Mr Weaver said.
Like Mr Cruz's campaign, Mr Kasich's encouraged allied super PACs - political action committees - and other outside groups to "honour the commitments".
Mr Trump did not immediately respond to the agreement. He has repeatedly condemned the Republican presidential nominating system as "rigged".
There was far less drama on the Democratic side as underdog Bernie Sanders rallied thousands of voters in two New England states, seeking momentum even as he offered mixed signals on how hard he would push his differences with front-runner Hillary Clinton.
The Vermont senator largely steered clear of Mrs Clinton at a Rhode Island park, but hours later ramped up his critique before more than 14,000 supporters in New Haven, Connecticut.
Mr Sanders reiterated his call for Mrs Clinton to release transcripts of lucrative Wall Street speeches she delivered after leaving the State Department in early 2013.
"This campaign, unlike Secretary Clinton's, has not raised 15 million (dollars) from Wall Street and millions more from other special interests," he said as the crowd booed at the mention of Mrs Clinton's name.
"This candidate has not given speeches behind closed doors on Wall Street for 225,000 dollars a speech."
Mrs Clinton eyed victories in four or five of Tuesday's contests, which would all but cripple Mr Sanders' White House bid.
The former US secretary of state went to two Philadelphia church services attended largely by African-Americans ahead of the primary in Pennsylvania, Tuesday's top delegate prize.
She declined to attack her Democratic rival by name in the morning appearance and a subsequent stop in Bridgeport, Connecticut, focusing on the GOP candidates.
Democratic National Committee chairwoman Debbie Wasserman Schultz downplayed tensions between Mr Sanders and Mrs Clinton, whose rivalry has become increasingly nasty in recent weeks.
"Regardless of the intensity of what's played out here ... we are going to be unified," she declared.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies