WASHINGTON â€” Not long after Ted Cruz arrived on Capitol Hill in 2013 as the Republican junior senator from Texas, he turned to one of the most senior members of the Senate Judiciary Committee, Dianne Feinstein, to deliver a stern lecture on what he saw as her limited knowledge of the Constitution.
â€śIâ€™m not a sixth grader,â€ť Ms. Feinstein, Democrat of California, snapped back, adding, â€śIâ€™m not a lawyer, but after 20 years, Iâ€™ve been up close and personal to the Constitution.â€ť
It was an inauspicious beginning, but now their relationship has come to a turning point, as the unlikely duo of Mr. Cruz and Ms. Feinstein â€” ideological and stylistic opposites who are running for re-election in very different border states â€” lead the Senateâ€™s effort to address family separation at the border.
With the House set to vote Wednesday on a far-reaching immigration bill that is all but certain to fail, the Cruz-Feinstein partnership â€” â€śan unusual couple,â€ť Senator Mitch McConnell, Republican of Kentucky and the majority leader, called them on Tuesday â€” is a reflection of how desperately both parties want to pass legislation.
Amid stories of parents searching in vain for their children, audio of wailing toddlers and images of detained teenagers behind chain-link, cagelike fences, there is intense pressure for Washington to act.
Senators of both parties say they are aiming for a narrow piece of legislation that would effectively codify the executive order that President Trump issued last week, which put a stop to the administrationâ€™s practice of removing migrant children from parents who seek asylum.
But while Mr. McConnell said Tuesday that he would like to see the Senate vote before the end of the week, that appears unlikely. After a preliminary negotiating session on Monday evening, both Mr. Cruz and Ms. Feinstein said Tuesday that they do not expect to wrap up their talks until after the July 4 congressional recess.
â€śI hope we can come to common ground,â€ť Mr. Cruz said. â€śIf we can come together around two core principles â€” No. 1, keeping families together, keeping children with their parents, and No. 2, enforcing the law and not encouraging illegal immigration â€” then I believe we will have legislation that can pass both houses of Congress and be enacted into law.â€ť
That is a big if.
Mr. Cruz and Ms. Feinstein are joined in their talks by two colleagues, Senators Thom Tillis, Republican of North Carolina, and Richard J. Durbin of Illinois, the No. 2 Democrat in the Senate. Mr. Durbin, who described the Monday evening talks as â€śthe opening conversation,â€ť said there are â€śclear differences on a few fundamentals.â€ť
Those differences, he said, revolve in part around a 1997 consent decree known as the Flores settlement, which bars migrant children from being detained for more than 20 days. After Mr. Trump issued his executive order, the administration asked a federal judge to alter the Flores settlement to allow families to be detained together indefinitely, infuriating Democrats.
Mr. Cruz has introduced legislation that aims to speed up the asylum process, rendering long detentions unnecessary. His bill would double, to about 750, the number of federal immigration judges, and provide for expedited processing of asylum cases so that they could be resolved within 14 days. (Mr. Trump, a one-time nemesis of Mr. Cruz on the 2016 presidential campaign trail, has mocked the proposal.)
But Senator Robert Menendez, Democrat of New Jersey, said that Mr. Cruzâ€™ speedy timetable creates a â€śrevolving doorâ€ť that would makes it impossible for any asylum seeker to gather the facts and witnesses necessary to prove his case. And he complained that Mr. Cruzâ€™s legislation includes no provisions for alternatives to detention, such as ankle bracelet monitors, which could be used to track migrants as they await court hearings.
â€śI donâ€™t know how you bridge that view and Dianneâ€™s view, which is much more narrow about making a policy that we donâ€™t detain children, No. 1, and we do seek alternatives to detention,â€ť Mr. Menendez said.
Ms. Feinstein has her own bill, a straightforward measure that simply bars the administration from separating parents and children, except in cases where the child is in danger. It is backed by every Senate Democrat. Republicans deride the bill as a â€ścatch and releaseâ€ť plan.
â€śThis is not what we need to do to enforce our laws and treat people in a compassionate and dignified sort of way,â€ť Senator John Cornyn of Texas, the No. 2 Republican in the Senate, told reporters Tuesday.
Mr. Cruz and Ms. Feinstein could hardly be more different. Mr. Cruz, 47, a onetime Tea Party acolyte, has never shown any compunction about blowing up the courtly traditions of the Senate. Apart from his unsuccessful presidential bid, he is perhaps best remembered for virtually single-handedly shutting down the federal government over his partyâ€™s refusal to defund the Affordable Care Act. He would not win a popularity contest in the Senate.
â€śIf you killed Ted Cruz on the floor of the Senate, and the trial was in the Senate, nobody would convict you,â€ť Mr. Cruzâ€™s fellow Republican, Senator Lindsey Graham of South Carolina, once said.
The genteel Ms. Feinstein, who turned 85 on Friday, is the oldest member of the Senate and is a guardian of the traditions Mr. Cruz has eschewed. She is the chamberâ€™s fiercest advocate for gun control â€” a cause Mr. Cruz abhors.
But on national security and intelligence matters, she tends to work across the aisle, and she said Tuesday that she has no reservations about linking arms with Mr. Cruz.
â€śOh, please,â€ť she said, with a smile and a wave of her hand. â€śThere was one scuffle, and I felt I gave as good as I got.â€ť
Like everything else on Capitol Hill, their effort is unfolding against the backdrop of the fall midterm elections. Ms. Feinstein, who handily won her primary in overwhelmingly Democratic California, appears likely to coast to re-election. But Mr. Cruz is facing an unusually spirited challenge from Representative Beto Oâ€™Rourke, a Democrat who has outpaced Mr. Cruz in fund-raising and has drawn national attention.
â€śThere is one reason why Ted Cruz is doing this: Beto Oâ€™Rourke,â€ť said Tom Jawetz, the vice president for immigration policy at the Center for American Progress, a liberal research group here.
A Senate matchmaker of sorts â€” Senator Susan Collins, Republican of Maine â€” brought the Texas and California senators together. Last week, as the public outcry over family separations grew, Ms. Collins, known for trying to forge consensus between Democrats and Republicans, invited a bipartisan group of about a dozen senators, including Mr. Cruz and Ms. Feinstein, to her office to talk.
â€śMy hope was that my meeting could be the catalyst for bringing them together in the same room, and also showing them that they had a supportive group of senators for the effort,â€ť she said, adding, â€śThe one outcome that I donâ€™t want to see happen is that there is a Democratic bill brought to the floor by Dianne and a Republican alternative brought to the floor by Ted Cruz, and we end up with nothing passing.â€ť
As the talks continue, senators are watching the budding alliance with a mixture of hope and bemusement. Mr. Tillis said he does not believe Mr. Cruz and Ms. Feinstein are that far apart, an assessment echoed by Senator Angus King, independent of Maine, who also attended the session in Ms. Collinsâ€™s office.
â€śI would love to have an opportunity to vote for a Feinstein-Cruz amendment,â€ť Mr. King said. â€śI think that would be remarkable in itself.â€ť
Follow Sheryl Gay Stolberg on Twitter: @sherylnyt.