WASHINGTON — In choosing Judge Brett M. Kavanaugh for the Supreme Court, President Trump went with a well-credentialed Washington insider who compiled a long record as a reliable conservative and won the respect of White House lawyers and the outside groups that advise them.

They are confident that, if confirmed by the Senate, he will move the high court to the right on abortion, gun rights, affirmative action, religious liberty and environmental protection, among other issues.

But his court record and status as a Beltway insider could also pose problems as the 53-year-old judge on the U.S. Court of Appeals for the District of Columbia Circuit seeks to move a few blocks up Capitol Hill to replace Justice Anthony M. Kennedy, for whom he worked as a law clerk from 1993 to 1994.

During the White House ceremony in which Trump named him, Kavanaugh declared that his “judicial philosophy is straightforward. A judge must be independent and must interpret the law, not make the law. A judge must interpret statutes as written. And a judge must interpret the Constitution as written, informed by history and tradition and precedent.”

Critics said beneath that rhetoric is a highly conservative, partisan lawyer. Kavanaugh’s extensive record in Washington will provide the opposition with ammunition. In the late 1990s, Kavanaugh played a lead role in the aggressive investigation of President Clinton led by independent counsel Kenneth W. Starr. He was an author of the Starr Report, which urged the House to impeach the president for lying about a sexual affair with White House intern Monica Lewinsky.

Senate Democrats are sure to press Kavanaugh to explain his views on investigating and impeaching a president based on allegations of lies and a cover-up, something that could prove uncomfortable for Trump given the investigation underway by special counsel Robert S. Mueller III.

A graduate of Yale College and Yale Law School, Kavanaugh — the only one of Trump’s four finalists with an Ivy League degree — will be in good company on a court where all the current justices have gone to law school at Harvard or Yale. Last year, Trump said he was drawn to his first appointee, Justice Neil M. Gorsuch, because he had degrees from Columbia, Harvard and Oxford.

Some conservative activists in recent days had begun a campaign against Kavanaugh, complaining about his past ties to the George W. Bush administration and previous rulings that were not hard-line enough for their taste. Many preferred one of the candidates who had worked outside of Washington, despite their less sterling resumes. The other finalists, also federal appeals court judges, were Amy Coney Barrett of Indiana, Thomas Hardiman of Pennsylvania and Raymond Kethledge of Michigan.

But lawyers who have worked with Kavanaugh are confident he will be boldly conservative.

“Brett Kavanaugh is courageous, tough and defiant. He will never, ever go wobbly,” said Justin Walker, a University of Louisville law professor who worked as a law clerk for both Kavanaugh and Justice Kennedy. “I predict that he would be a rock-solid conservative in the Alito-Thomas mold,” he said, referring to Justices Samuel A. Alito Jr. and Clarence Thomas.

The announcement comes just 12 days after Kennedy, 81 — the court’s influential swing vote for decades — said he would step down, opening the door for a Republican president to appoint a more reliable conservative who could shift the court to the right for a generation or more and potentially overturn or limit the landmark abortion ruling Roe vs. Wade.

Trump and the Republican-controlled Senate are wasting no time, just in case Democrats take over the chamber in the midterm election. They are also hoping that completing Trump’s second high court appointment will energize GOP voters in November.

Trump had been teasing about his choice for days, urging supporters to tune in Monday night and building suspense by suggesting he would wait until the final hours to decide. The big reveal, as they say in the reality-television industry, came during a prime-time announcement in the East Room of the White House, surrounded by high-profile Republicans and Kavanaugh’s wife and two daughters.

“This incredibly qualified nominee deserves a swift confirmation and robust bipartisan support,” Trump told the gathering.

Kavanaugh used much of his remarks to emphasize the support he has received throughout his life from women, including his mother, wife, daughters, mostly female law clerks and even Elena Kagan, a President Obama appointee to the Supreme Court, who as Harvard Law School dean once hired Kavanaugh.

The nod to women will probably provide a talking point in his favor for female Republican senators who aren’t anxious to break with Trump, even though they have concerns about how the nominee might rule on abortion and health issues.

Several of the senators thought to hold key votes on the confirmation, including Sens. Susan Collins (R-Maine), Lisa Murkowski (R-Alaska) and Heidi Heitkamp (D-N.D.), declined White House invitations to attend the announcement.

In a statement Monday night, Collins praised Kavanaugh’s “impressive credentials and extensive experience.” Another possible swing vote, Sen. Joe Manchin III (D-W.Va.), said he remained concern about how Kavanaugh would vote on preserving key provisions of the Affordable Care Act.

“I’m very interested in his position on protecting West Virginians with preexisting conditions,” Manchin said.

With only a 51-seat Senate majority, Republicans cannot afford to lose a single vote, assuming all Democrats vote no and the ailing Sen. John McCain (R-Ariz.) remains in his home state battling cancer.

Both sides moved quickly to begin the battle over Kavanaugh’s confirmation. Within minutes of the announcement, the Democratic National Committee released a video declaring Kavanaugh an extremist who would have the power to overturn Roe vs. Wade and gut the Affordable Care Act.

On the Republican side, conservative groups had already reserved time for television ads in states whose Democratic senators might be vulnerable.

“Judge Kavanaugh has consistently proven to be a conservative ideologue instead of a mainstream jurist,” said Sen. Kamala Harris (D-Calif.).

Sen. Dianne Feinstein (D-Calif.) called him a “partisan political operative,” and Senate Democratic leader Charles E. Schumer of New York promised to “oppose Judge Kavanaugh’s nomination with everything I have.”

Senate Judiciary Committee Chairman Charles E. Grassley (R-Iowa) called Kavanaugh “one of the most qualified Supreme Court nominees to come before the Senate.” Former President George W. Bush also offered his endorsement.

The Supreme Court selection is yet another staid Washington ritual transformed by Trump, who learned the narrative power of reality TV while hosting NBC’s “The Apprentice.” Trump staged a similar event early last year when he nominated Gorsuch to replace deceased Justice Antonin Scalia, whose seat opened during Obama’s final year in office but was kept vacant by a GOP-controlled Senate that refused to consider Obama’s nominee.

Trump has delighted in choosing judges, an issue that unites conservative groups.

Kavanaugh’s long record in Washington will give Senate Democrats plenty of material to press at his confirmation hearing.

During Starr’s investigation, Kavanaugh took on the task of reexamining the suicide of Vince Foster, a deputy White House counsel and close friend of Bill and Hillary Clinton who had come under fierce attack in the conservative media.

Years later Kavanaugh changed his mind about his role in the Starr investigation and said presidential investigations were harmful to the country.

In December 2000, with the presidential race between Al Gore and George W. Bush undecided, Kavanaugh joined the Republican legal team that won the fight to stop the ballot recount in Florida.

Kavanaugh took a post in the White House counsel’s office under President Bush and later served as his staff secretary. Bush nominated him to the U.S. Court of Appeals for the District of Columbia Circuit in 2003, but because of strong opposition from Democrats, he was not confirmed until 2006.

Since then, he has written about 300 opinions and compiled a solidly conservative record on a court that has a steady diet of dense regulatory disputes. Kavanaugh was skeptical of several of the Obama administration’s environmental regulations, including efforts to limit greenhouse gases and hazardous air pollutants.

And he dissented in 2015 when the appeals court upheld a revised regulation under the Affordable Care Act involving contraceptives. Although religious employers did not have to provide or pay for the disputed contraceptives, they were required to file a form notifying the government that they were opting out. Dissenting in Priests for Life vs. U.S. Department of Health and Human Services, Kavanaugh said that filing the form would make them complicit, and therefore would violate their rights to religious freedom.

Kavanaugh appears to support broader gun rights under the 2nd Amendment. In 2011, he filed a 52-page dissent when the appeals court, by a 2-1 vote, upheld a District of Columbia ordinance that prohibited semiautomatic rifles and magazines holding more than 10 rounds. The judges in the majority, both Republican appointees, noted that several large states, including California and New York, enforced similar laws.

But Kavanaugh said the ban on semiautomatic rifles was unconstitutional because the weapons are in common use in this country. “As one who was born here, grew up in this community in the late 1960s, 1970s and 1980s, and has lived and worked in this area almost all of his life, I am acutely aware of the gun, drug and gang violence that has plagued all of us…. But our task is to apply the Constitution and the precedents of the Supreme Court, regardless of whether the result is one we agree with as a matter of first principles or policy,” he wrote.

Since the Supreme Court in 2008 established a 2nd Amendment right for individuals to have a gun at home, the justices have refused to hear a 2nd Amendment challenge to state laws or local ordinances that restrict the sale of semiautomatic weapons.

Kavanaugh’s long record as a judge has left him open to attack from the right as well as the left.

In 2011, when Obama’s healthcare law was under assault, Kavanaugh dissented when a D.C. Circuit Court panel upheld the law, but only on procedural grounds. He cited the Tax Injunction Act, which said judges should not decide suits challenging a tax provision until the plaintiff has first paid the tax. His view, if upheld, would have delayed a constitutional challenge to the law, and some on the right faulted him for not simply declaring the law unconstitutional.

Late last year, Kavanaugh was in the middle of a fast-moving dispute over whether a pregnant 17-year-old who was held by immigration authorities could leave to see a doctor and obtain an abortion. The Trump administration refused her request and said it did not have to “facilitate” an abortion. After the ACLU sued on her behalf, a federal district judge in Washington ruled she had a right to leave and obtain the abortion. Kavanaugh disagreed and gave the government 10 more days to find a sponsor for the young woman.

But the full appeals court took up the case and reinstated the ruling of the district judge. In dissent, Kavanaugh faulted the majority for creating “a new right for unlawful immigrant minors in U.S. government detention to obtain immediate abortion on demand.”

His stand nonetheless has drawn some criticism in conservative circles because he did not join a separate dissent by Judge Karen LeCraft Henderson. She contended that immigrants in the country illegally had no constitutional rights.

Kavanaugh was one of the last additions to a list of potential GOP nominees, updated last year to 25 names from the initial 11, that was assembled and vetted by the Federalist Society and the Heritage Foundation, conservative groups with tremendous influence in the Trump White House.

david.savage@latimes.com

Times staff writers Noah Bierman, David Lauter

and Sarah D. Wire in Washington contributed

to this report.