WASHINGTON (AP) — Newly in the minority, Democrats voted with Republicans on Thursday to advance legislation that would require federal authorities to detain unauthorized immigrants who have been accused of certain crimes — signaling that they will try and find spots to work with President-elect Donald Trump while simultaneously trying to block much of his agenda.

Senate Democratic Leader Chuck Schumer and most other Democrats voted to proceed with the legislation, advancing the bill 84-9. Trump and Republicans have pushed the bill and made it a priority since Georgia nursing student Laken Riley was killed last year by a Venezuelan man who entered the U.S. illegally and was allowed to stay to pursue his immigration case.

Still, Schumer hasn’t promised to vote for the final bill — and he made clear that Democrats want Republicans to work with them on bipartisan amendments. Thursday’s procedural vote will allow that process to begin.

On the Senate floor ahead of the vote, Schumer said that new Majority Leader John Thune, R-S.D., “has said he wants to make the Senate a place where all members should have a chance to make their voices heard. This bill would be a fine place to start.”

Schumer’s support for the bill comes after Democrats lost the Senate and the presidency in the November elections and are trying to thoughtfully pick their battles against Trump while still trying to block much of his agenda. Republicans will need seven Democratic votes to pass most major policy items in the 53-47 Senate, and Schumer has said repeatedly that Thune will have to work with them to get things done.

The new Democratic strategy is a shift from Trump’s first term, when Democrats openly and aggressively fought Trump on most issues. And it’s evidence of the delicate balance that Schumer is trying to strike after Republicans dominated last year’s elections and as some of the more moderate members of his caucus are trying to show they can work with the new president.

Several Democrats who were up for election last year embraced stricter immigration controls partly to blunt GOP attacks as the Biden administration struggled to manage an influx of migrants at the Southwest border. Some of those Democrats suggested they could support the final bill.

Michigan Sen. Elissa Slotkin, a freshman Democrat who was elected in November, posted on X that “Michiganders have spoken loudly and clearly that they want action to secure our southern border. We must get past petty partisanship that continues to dominate the immigration debate.”

Slotkin said she hopes there will be an amendment process once debate begins next week. Alabama Sen. Katie Britt, a lead Republican on the bill, told reporters afterward that Republicans are open to working with Democrats on amendments but that they would oppose efforts to expand the bill beyond its original scope.

Beyond the immigration bill, some Democrats are showing their willingness to work with Trump by supporting some of his nominees.

Nevada Democratic Sen. Jacky Rosen, for example, met with New York GOP Rep. Elise Stefanik, Trump’s nominee to be ambassador to the United Nations, and posted on X, “I look forward to working with her.” Pennsylvania Democratic Sen. Jon Fetterman has met with two of Trump’s more controversial nominees, Secretary of Defense nominee Pete Hegseth and FBI Director nominee Kash Patel, and announced Thursday that he will visit Trump at his home in Florida.

Fetterman said on ABC’s “This Week” on Sunday that he’s been telling Democrats that “the constant freak out. It’s not helpful.”

Democratic leaders appear to agree. As he tries to navigate the new era, Schumer has been working to tie most of the Democrats’ positions to the economy, not Trump himself.

“If Republicans want to work with us on real policies that lower costs for real working Americans, we’re glad to partner with them,” Schumer said.

On the immigration bill, Schumer noted in his morning remarks that Thursday’s vote was “not a vote on the bill itself,” but a vote to move to debate. “Democrats want to have a robust debate where we can offer amendments and improve this bill,” he said.

It’s unclear whether Schumer will vote for the final product or if it will have enough Democratic votes to pass.

The House passed the legislation earlier this week, making the legislation one of the first actions in the newly Republican-controlled Congress after they seized on Riley’s murder as a rallying point during the election. It would require U.S. Immigration and Customs Enforcement to arrest unauthorized migrants who commit theft, burglary, larceny, or shoplifting offenses and mandate that they are detained until they are removed from the U.S.

The bill also would allow states to sue the federal government if they can demonstrate harm caused by immigrants who enter the country illegally.

In a call ahead of the vote, former government officials and immigration advocates asked the Senate to not pass the bill and warned that the legislation, if approved, would be unconstitutional and would help President-elect Trump to implement an anti-immigration agenda.

“It strains Border Patrol and ICE resources, hamstrings their ability to focus on real security threats, and prioritizes the detention of individuals with minor infractions over violent, convicted offenders,” said Jason Houser, former chief of staff at U.S. Immigration and Customs Enforcement under President Joe Biden. “If enacted, it will leave fewer violent offenders in detention and weaken our ability to protect communities.”

The House passed the bill last year, but Schumer did not bring it up for a vote when Democrats were in the majority.

___

Associated Press writer Gisela Salomon in Miami contributed to this report.