WASHINGTON— A week after saying that it would be “illegitimate” and “wrong” for party insiders at the Republican National Convention to nominate a presidential candidate against the wishes of most voters, Ted Cruz said Sunday it would be fine if the convention chose between him and front-runner Donald Trump as long neither had achieved the 1,237 delegates needed to secure the nomination on first ballot.

“If Donald and I both go into the convention and we’ve both got a big chunk of delegates but both of us are shy of 1,237, then the delegates will decide,” the Cruz said on ABC’s “This Week. “That’s how the process works and that’s allowing democracy to operate.”

Cruz, who is second to Trump in delegates pledged to him through caucus and primary results, said he would “welcome” supporters of Marco Rubio and John Kasich who want to switch to the candidate who, so far, has most often bested Trump, whom he portrayed as an unelectable.

“Neither one of them have any possibility of beating Donald Trump,” Cruz said. “If you don’t want to see Donald Trump as the nominee, if you don’t want to see Hillary Clinton as the president, then come join us.”

Cruz had scoffed as recently as March 6 at the thought of “a bunch of Washington deal-makers and lobbyists who want to parachute in their preferred candidate because they don’t like what the voters are doing.” Yet he seemed to soften ahead of Tuesday’s five nominating contests in which, for the first time, all delegates in a given state will pledge to support that state’s winner rather than splitting up to reflect vote share. The new structure would allow Trump, or one of his challengers, to collect delegates more quickly and potentially achieve an insurmountable advantage before the convention in July.

Others, including 2012 Republican presidential nominee Mitt Romney, had suggested that Trump could still lose the nomination even if he entered the convention with a plurality of delegates pledged to him. Delegates need not stay pledged to a candidate in subsequent votes if no one wins the first ballot with a majority.

Friday, Rubio, a Florida senator, said his supporters in Ohio should vote for Kasich, who is the state’s governor, as a way to stop Trump – a strategy that could help deny Trump an outright majority. Kasich didn’t reciprocate by suggesting his supporters should vote for Rubio in Florida, where the senator polls behind Trump despite his home-state advantage.

“I’m going to win in Ohio,” Kasich said Sunday on “This Week.” “I believe there is a good chance I could into the convention with the most amount of delegates.”

While Cruz said convention delegates could choose between candidates “who are neck-in-neck,” he repeated that it “would be an absolute disaster” if “there’s a deadlock and the Washington dealmakers come in and pick their favorite candidate who wasn’t even part of the mix.”