The Supreme Court is getting ready to wrap up a pivotal term in which it has weighed in on a number of President Trump's most controversial policies and delved into some of the most hotly debated topics. It's customary for the justices to save some of their most important rulings for the end of the term, and this year is no exception.

Only a handful of cases are still undecided. But that short list includes Trump's effort to revoke birthright citizenship, transgender sports bans and a Republican-led attempt to limit mail-in voting.

Among the cases that have been decided, the president has mostly been on the winning side. The court's conservative supermajority has ruled in Republicans' favor on immigration, gun rights and several elections disputes. The glaring exception was Trump's tariffs, which the justices struck down after finding he didn't have the legal authority to impose them.

Here's a rundown of what's still to come as the court finishes up its term and some of the most important cases that have already been decided.

What is the case about? At the beginning of his second term, Trump signed an executive order attempting to end the practice of universal birthright citizenship, which grants full U.S. citizenship rights to anyone born in the country. Under the terms of the order, a baby's citizenship would be decided by the legal status of its parents. Children born to mothers who are in the country illegally or who are legally present on a temporary visa would not be granted citizenship unless their father is a citizen or legal permanent resident. Trump's order would, for the first time, create a category of immigrants whose children would not automatically become American citizens.

What's at stake? If the court sides with Trump, about 255,000 babies born in the U.S. each year would be denied citizenship rights that they would have had otherwise, according to an estimate by the Migration Policy Institute and Penn State's Population Research Institute. In their ruling, the justices will also be weighing in on a more fundamental question that the case raises: After more than 150 years of legal precedent, does the president have the power to unilaterally redefine the 14th Amendment's guarantee of birthright citizenship?

If the oral arguments are any indication, the court may find that he doesn't. The justices — even the conservative ones — appeared to be skeptical of the Trump administration's reasoning when they heard the case in April.

What are the cases about? One of the ways that Trump has reshaped the federal government since returning to the White House is through mass firings of federal workers. The court is now considering two cases involving high-ranking government employees who say the president violated the law when he attempted to fire them. Those workers, Federal Reserve Board member Lisa Cook and Federal Trade Commission member Rebecca Slaughter, both held positions with legal protections that limit when they can be fired only for certain reasons.

What's at stake? These cases have implications that go well beyond whether two people can keep their jobs. They will determine how much power Trump and future presidents have to reshape some of the most important agencies in the federal government. Because of their critical roles in the economy, the Federal Reserve and the FTC were specifically designed by Congress to be insulated from political influence. If the court sides with Trump, it will be giving him much greater authority over more of the federal government.

There are important differences between the two cases that could mean they'll have different outcomes. Cook's case rests on whether the Trump administration's stated reason for firing her — a disputed allegation that she committed mortgage fraud — meets the standard for "cause" under the law. In Slaughter's case, the administration is trying to have the law that protects FTC commissioners from getting fired thrown out entirely. In what may be a reflection of how the justices are leaning in each case, Cook has been allowed to stay in her position while her case plays out. Slaughter has not.

What are the cases about? A total of 27 states have laws on the books that ban transgender athletes from participating in girls' or women's sports. The court is considering challenges to two of those laws filed by transgender athletes who argue that the bans violate their constitutional rights to equal protection under the law.

What's at stake? While there is no definitive count, the number of transgender athletes participating at any level of sports is believed to be very small. One of the cases before the court involves a 15-year-old from West Virginia who is believed to be the only openly trans student-athlete in her entire state. Two years ago, the head of the NCAA told Congress that he was aware of "less than 10" trans competitors in all of college sports.

Sports bans are part of a much broader campaign to limit the rights of transgender people, including bans on gender-affirming care for minors, laws dictating which bathrooms trans people can use and a Trump administration policy requiring Americans' passports to display their "biological sex at birth." Last year, the justices issued rulings allowing both the care bans and passport policies to remain in effect. Many legal experts expect them to do the same when it comes to sports.

What is the case about? The court is considering a lawsuit filed by Republicans seeking to block states from counting mail ballots that are received after Election Day. More than a dozen states allow late-arriving ballots from all voters to be counted as long as they are postmarked by Election Day, and 30 accept late ballots from overseas military personnel. The Republican National Committee and the Mississippi Republican Party are asking the court to ban these grace periods and only allow states to accept ballots that are received on or before Election Day.

What's at stake? If the court sides with the GOP, ballots that arrive after Election Day will no longer be counted in American elections. While those ballots represent a relatively minor share of total votes cast in any given year, even a small number of ballots being thrown out could decide the outcome in close races. The case is also part of a more comprehensive campaign by Republicans to limit mail-in voting across the country, which includes Trump's call for a near-total ban on the practice. If the justices side with the GOP, as some legal experts expect, that could signal that they would be open to allowing even more restrictive mail voting limits to stand in future cases.

Trump has had a lot of victories at the Supreme Court during his second term, but one he was on the wrong side of was arguably the biggest decision so far. In February, the court struck down his far-reaching global tariffs, which the president had imposed on imported goods from nearly every other country. With its decision, the court struck a major blow to Trump's economic agenda and created ripple effects that are still being felt throughout the global economy. The Trump administration has begun the process of refunding up to $166 billion collected under the tariffs, but the president has also vowed to find new legal grounds for replacing the levies that were knocked down by the court.

Since returning to the White House, Trump has repeatedly tested the bounds of his legal authority as part of his sweeping immigration agenda. In four separate decisions this term, the Supreme Court signed off on his administration's policies aimed at removing immigrants from the country and limiting who can enter the U.S.

Two of those rulings came on Thursday. The first cleared the way for Trump to revoke Temporary Protected Status from hundreds of thousands of Haitian and Syrian immigrants. Those migrants, who had been permitted to stay because the government had previously found that it was unsafe for them to return to their home countries, are now subject to deportation. The second ruling opens the door for the Trump administration to substantially limit the number of potential migrants who get the opportunity to apply for asylum protections within the United States.

The court sided with the administration in another decision on Tuesday that gave immigration officers more leeway to block certain green card holders who have left the U.S. from reentering the country. Earlier in the term, the justices also unanimously agreed to establish new standards that make it harder for courts to overturn rejected asylum claims.

Democrats and Republicans spent months in a back-and-forth redistricting battle over which party could redraw state congressional maps to secure the most new House seats ahead of November's pivotal midterms. Both sides were restrained in that competition by legal limits that restricted them from breaking up districts with a high concentration of minority voters. But in April, the Supreme Court significantly weakened those limits. The decision gave state legislatures even more room to tactically carve up their maps for political gain.

That ruling came late enough in the midterm cycle that most states weren't able to get new maps in place in time for this year's election. But one estimate found that Republicans could gain as many as 19 additional seats in the House by redistricting under the new, more permissive rules in 2028. Another result of the decision could be a significant decrease in the number of minority lawmakers in Congress.

In March, the justices set the stage for an end to laws banning conversion therapy — the widely debunked practice aimed at convincing LGBTQ people to change their sexual orientation or gender identity. In an 8-1 ruling, the court found that bans on conversion therapy likely violate the First Amendment by restricting the speech of those who administer the practice. The justices didn't formally strike down state-level bans, but their ruling created a new legal standard that most of those laws are likely to fail when they're challenged in court. The decision came despite a wide consensus among medical experts that conversion therapy, in the words of the American Psychological Association, is "largely ineffective" and poses "serious risks of harm."

The court issued the latest in a long string of pro-gun rights rulings when it struck down a Hawaii gun control law. The justices found that the law, which barred gun owners from carrying firearms onto private property without the owner's permission, violated the Constitution. Earlier this month, the justices also unanimously ruled that a law barring some drug users from possessing guns violated the Second Amendment.

In a case that was mostly overlooked because it involved arcane copyright law and left the status quo intact, the justices unanimously rejected an effort by Sony to hold Cox Communications liable for illegal piracy committed by subscribers to Cox's internet service. Had the case gone the other way, it would have sent a shockwave through the tech industry that could have radically altered the online economy.

On Thursday, the justices sided with the agrochemical company Monsanto in a high-stakes dispute over whether it could be held liable for failing to warn consumers that the key ingredient in its weedkiller, Roundup, may cause cancer. Monsanto has already paid billions in damages from lawsuits tied to Roundup, but the court's decision likely spares the company from having to pay more as part of the thousands of suits that are still ongoing. The ruling created a rare split among Trump's supporters. His administration backed Monsanto's claim. But some members of the Make America Healthy Again coalition were outraged by the decision, partially blaming Trump for allowing Monsanto to avoid liability for failing to warn consumers about Roundup's alleged cancer risks.