Mayor Bill de Blasio’s plan to overhaul admissions at some of the city’s premier high schools runs through the New York state legislature.

That plan would eliminate the admissions test that grants entrance into the eight schools, a move de Blasio says would help more black and Hispanic students earn coveted seats at the top schools. But in order to eliminate the test at three of the eight schools, the mayor needs Albany lawmakers who haven’t always been kind to him in the past — to change state law.

That leaves a major question: Will the mayor ever be able to get this legislation passed?

Experts and politicians agree that, with less than a month left in the legislative session, the change is unlikely to happen this year. Shifting dynamics in Albany could give the legislation a shot next year — though it’s far from a done deal, and opposition is already forming.

Here’s what else we know about the political chances of the bill that the mayor backs.

Why will the bill have trouble this year?

For one, this year’s legislative session is set to end on June 20. And while New York’s lawmakers are known for sweeping last-minute deals, this year has been defined by a political stalemate that has kept much from happening.

The backstory: Democrats won two special elections in April, narrowing Republicans’ control over the Senate. They held control by just one vote, thanks to a Democratic senator from Brooklyn who caucuses with Republicans.

Then, a Republican senator was called to return to military service, essentially eliminating the Republicans’ slim majority. Gov. Andrew Cuomo acknowledged on Monday that this deadlock has made it difficult to pass legislation.

“We only have a few days left of the legislative session and, as you know, it’s not the most productive end-of-session that we’ve ever had,” he told NY1.

Still, at least some in the Assembly are taking a hard look at the bill. It is on the agenda for the education committee meeting on Wednesday, which means it is being taken seriously by some lawmakers, said Jasmine Gripper, legislative director for the Alliance for Quality Education.

To pass, the bill also likely needs support from the governor. Cuomo said Monday he does not believe the issue will be resolved this year.

“I think the issue is an important issue … and I think the mayor raises legitimate concerns,” Cuomo said. But, he added, “I don’t know that there’s much of an appetite in Albany now to get into a new bill, a new issue.”

It also seems unlikely that such a change could build political support in just a few weeks, especially as alumni groups and some Asian-American community leaders are already mobilizing against the plan. (The greatest share of offers at specialized high schools goes to Asian students.)

On Monday, an Asian-American advocacy group held an event with signs saying “End Racism” and called the plan a “21st century Chinese Exclusion Act,” according to tweets from a NY1 reporter who was there.

What could help its chances next year?

As part of Albany’s political upheaval, a group of breakaway Democrats who worked with Republicans in the State Senate disbanded this year, paving the way for Democrats to control the chamber if they win elections this fall.

If the Senate flips it would be good news for de Blasio, who has feuded with Senate Republicans in the past. Senate Democrats are also more likely than Senate Republicans to be aligned with the liberal mayor.

Also, two key players in Albany — Cuomo and Assembly Speaker Carl Heastie have signaled that they are at least open to a conversation about diversity in specialized high schools. However, neither has expressly supported the mayor’s preferred bill.

What could still stop the bill next year?

The bill is facing heavy opposition from the politicians themselves, some of whom attended one of the schools in question. Some Democratic senators have already criticized de Blasio’s proposal.

“I couldn’t disagree more with Mayor de Blasio and Chancellor Carranza’s plan on eliminating the entrance test for the specialized high schools,” Democratic Sen. Toby Stavisky said in a statement. Stavisky attended Bronx Science and was a teacher at Brooklyn Technical High School. “To assume African American and Latino students cannot pass the test is insulting to everyone and educationally unsound.”

The bill could also face opposition in the Assembly. Several Assemblymembers have expressed reservations about eliminating the test.

“Instead of engaging Asian American families to be part of the solution, they have been excluded and pitted against other minority groups,” said Assemblyman Ron Kim.

“Unless all immigrant groups, including Asian American families whose children represent a significant portion of test-takers as well as the student bodies in our Specialized High Schools, are part of the decision-making process, I can’t support [the bill] or any efforts to reform the admissions process,” Kim added.

Democratic senators opposing the plan could be the kiss of death, said Peter Goodman, a close observer of New York state education politics who runs a blog on the issue. (Goodman, like others, pointed out that the bill may change before it is up for a vote.)

“I don’t think it has any shot of getting through the legislature if Democratic senators are opposed to it,” he said.

Additionally, the mayor will have to weigh his attempt to eliminate the admissions test against other priorities, like extending his control over the schools and funding for pre-kindergarten, which have historically taken a lot of the city’s lobbying energy.

“We’re hoping against hope for an opening right now because there’s a lot of support in the Assembly and again the time is right in terms of public debate,” de Blasio said on Sunday. “If we can’t get it done now, it sets us up very well to get it done in the next session.”