WASHINGTON — After days of frenzied lobbying and speculation, President Donald Trump decided on federal appeals Judge Brett Kavanaugh for his second nominee to the Supreme Court, setting up a ferocious confirmation battle with Democrats as he seeks to shift the nation’s highest court further to the right.

Trump chose Kavanaugh to replace retiring Justice Anthony Kennedy.

With customary fanfare, Trump planned to unveil his choice on prime-time TV. His final options were all young federal judges who could help remake the court for decades to come with precedent-shattering rulings on issues such as abortion, guns and health care.

Top contenders had included federal appeals judges Raymond Kethledge, Amy Coney Barrett and Thomas Hardiman, as well as Kavanaugh, who is currently a federal appellate judge in the District of Columbia.

Relishing the guessing game beyond the White House gates, Trump had little to say about his choice before the announcement.

Some conservatives have expressed concerns about Kavanaugh — a longtime judge and a former clerk for Kennedy — questioning his commitment to social issues like abortion and noting his time serving under President George W. Bush as evidence he is a more establishment choice. But his supporters have cited his experience and wide range of legal opinions.

Ahead of his announcement, Trump tweeted about the stakes: “I have long heard that the most important decision a U.S. President can make is the selection of a Supreme Court Justice – Will be announced tonight at 9:00 P.M.”

With Democrats determined to vigorously oppose Trump’s choice, the Senate confirmation battle is expected to dominate the months leading up to November’s midterm elections. Senate Republicans hold only a 51-49 majority, leaving them hardly any margin if Democrats hold the line. Democratic senators running for re-election in states Trump carried in 2016 will face pressure to back his nominee.

Republican Sen. John Kennedy of Louisiana said he was bracing for a tough confirmation battle as Democrats focus on abortion. Kennedy, a member of the Judiciary Committee, which will get the first chance to question the nominee, predicted a “rough, tough, down in the dirt, ear-pulling, nose-biting fight.”

Trump’s success in confirming conservative judges, as well as a Supreme Court justice, has cheered Republicans amid concerns about his limited policy achievements and chaotic management style. Of the court’s liberal justices, Ruth Bader Ginsburg is 85 and Stephen Breyer turns 80 next month, so Trump may well get another opportunity to cement conservative dominance of the court for years to come.

Kavanaugh is likely to be more conservative than Justice Kennedy on a range of social issues. At the top of that list is abortion. A more conservative majority could be more willing to uphold state restrictions on abortion, if not overturn the 45-year-old landmark Roe v. Wade decision that established a woman’s constitutional right.

Kennedy’s replacement also could be more willing to allow states to carry out executions and could support undoing earlier court holdings in the areas of racial discrimination in housing and the workplace. Kennedy provided a decisive vote in 2015 on an important fair housing case.

While the president has been pondering his choice, his aides have been preparing for what is expected to be a tough confirmation fight. The White House said Monday that former Arizona Sen. Jon Kyl would guide Trump’s nominee through the grueling Senate process.

Kyl, a former member of Republican leadership, served on the Senate Judiciary Committee before retiring in 2013. He works for the Washington-based lobbying firm Covington & Burling. The White House hopes Kyl’s close ties to Senate Republicans will help smooth the path for confirmation.

Trump is hoping to replicate his successful nomination of Justice Neil Gorsuch last year. The president has spent the days leading up to his announcement discussing the pros and cons of various contenders with aides and allies. In addition to Kavanaugh, in recent days he expressed renewed interest in Hardiman, the runner-up when Trump nominated Gorsuch, said two people with knowledge of his thinking.

The White House invited a number of senators to attend the Monday night announcement, including Judiciary Committee Chairman Chuck Grassley, R-Iowa, and committee member Kennedy.

Democrats who were invited but declined included Sens. Joe Donnelly of Indiana, Heidi Heitkamp of North Dakota, Doug Jones of Alabama, Joe Manchin of West Virginia and Dianne Feinstein of California. Feinstein is the ranking Democrat on the Judiciary Committee. The others are Republican targets for the confirmation vote who come from Trump-won states where they face re-election this fall.

Kavanaugh is expected to meet in coming days with senators at their offices, going door-to-door in get-to-know-you sessions ahead of confirmation hearings.

Democrats have turned their attention to pressuring two Republicans, Sens. Susan Collins of Maine and Lisa Murkowski of Alaska, to oppose any nominee who threatens Roe v. Wade. The two have supported access to abortion services.

One Democrat up for re-election, Bob Casey of Pennsylvania, announced Monday he would oppose any nominee from Trump’s list of 25 possible candidates, drafted by conservative groups. He called it the “fruit of a corrupt process straight from the D.C. swamp.”

Senate Majority Leader Mitch McConnell said opponents were using “40-year-old scare tactics” over abortion and other issues but they “will not stop us from doing the right thing.”

Hardiman had a personal connection to the president, having served with Trump’s sister on the 3rd U.S. Circuit Court of Appeals in Philadelphia. He went to the University of Notre Dame as the first person in his family to go to college. He helped finance his law degree at the Georgetown University Law Center by driving a taxi.

Barrett — a longtime Notre Dame Law School professor who became a federal appeals judge last fall — excited social conservatives with her testimony when questioned about her Roman Catholic faith in her nomination hearings last year. But her brief time on the bench has raised questions about her experience.