President Trump on Friday became the first president to attend the March for Life event in Washington, expressing solidarity with tens of thousands of conservative and evangelical voters that his campaign considers a core constituency for his reelection bid.

Trump made no mention of the ongoing Senate impeachment proceedings taking place just blocks away at the Capitol as he addressed throngs of antiabortion activists on the Mall. But his relatively brief appearance offered an implicit split screen for a president who has been consumed with the Democrats’ efforts to oust him.

The appearance also followed a threat Friday from the Trump administration to withhold federal funding from California over its requirement that private insurers cover abortions — a move state officials immediately denounced as a “cheap political” shot timed to coincide with the antiabortion rally.

Taking the lectern to his campaign theme, Lee Greenwood’s “God Bless the U.S.A.,” Trump basked in applause, pumping his fist and mouthing thank yous to the crowd. Some were dressed in “Make America Great Again” hats, and chants of “Four more years!” were audible as he began speaking.

“Unborn children have never had a stronger defender in the White House,” Trump said, hewing closely to his prepared text in a 13-minute address that was peppered with partisan attacks on “far-left Democrats,” whom he accused of “working to erase all our God-given rights.”

“They are coming after me because I am fighting for you,” Trump declared.

Though he was referring to the abortion debate, the president sounded like he could have been alluding to the impeachment fight when he added: “We will win because we know how to win.”

Trump’s decision to attend the rally in its 47th year was the culmination of a remarkable shift by a president who had called himself “very pro-choice” in a television interview two decades ago and who entered office amid some reservations among antiabortion activists. The president highlighted a list of actions he has taken over the past three years — including a ban on nongovernmental organizations from using federal money to offer abortion services abroad — that have earned him praise from movement leaders, who said he has done more than his Republican predecessors.

“It’s really been remarkable. He’s leaned into this more than any other pro-life president,” Jeanne Mancini, the president of March for Life, said on Fox News. “This is unprecedented.”

Trump’s reelection campaign heavily promoted his appearance at the rally, tweeting endorsements from influential figures and announcing the creation of a new outreach effort called “Pro-Life Voices for Trump” that will be co-chaired by Marjorie Dannenfelser, president of the Susan B. Anthony List, and Catholic priest and activist Frank Pavone.

Surrogates quickly sought to paint Democrats as trying to undermine Trump’s efforts to deliver on his legislative agenda.

Democrats spend the day “grandstanding on lies for political self-interest,” Jenna Ellis, a legal adviser for the Trump campaign, wrote on Twitter. She asserted that Trump was “standing firm on a moral truth to save the lives of millions.”

But abortion rights activists denounced Trump for what they viewed as the president’s false and dangerous rhetoric on abortion, as well as policies that Planned Parenthood said has “endangered, if not completely cut off, health care for people at home and around the world.”

In his remarks, Trump said Democrats in New York cheered legislation that “would allow a baby to be ripped from the mother’s womb right up until delivery.” Fact-checkers have called this interpretation of the law, which allows for abortions after 24 weeks if the mother’s health is at risk or there is an absence of fetal viability, inaccurate.

The president also accused Virginia’s Democratic governor, Ralph Northam, of stating that he would “execute a baby after birth,” though a spokeswoman for Northam said at the time that his words were taken out of context by Republicans.

“Trump has often parroted debunked, fearmongering rhetoric about abortion that is intended to mislead the public and shame women,” Samuel Lau, a Planned Parenthood official, wrote in a memo to reporters. “It’s important not to accept this kind of language as normal.”

Trump has sought to rally evangelicals in recent weeks, after the editor in chief of Christianity Today published an op-ed in December endorsing the effort to impeach him over his conduct in allegedly pressuring Ukraine’s leader to open an investigation into former vice president Joe Biden, a top Democratic presidential contender.

The president held a campaign rally for evangelicals in Miami this month, and his administration announced new measures last week to protect the rights of students to pray in public schools. On Friday, the administration’s Office for Civil Rights said California was violating federal conscience protections with its abortion insurance requirements.

In past years, Trump had addressed the March for Life through video messages, and Vice President Pence made a surprise appearance on the Mall last year. Tim Murtaugh, the Trump campaign’s spokesman, said the president’s decision to embrace the march reflects an understanding that “for a lot of voters, opposing abortion is their number one issue.”

Murtaugh said the issue cuts across demographic lines and appeals to African Americans and Latinos, as well as Catholics “who support the president because of this issue.” According to a Washington Post-ABC News poll last summer, about 1 in 7 voters overall called abortion “one of the single most important issues,” with 20 percent of Democrats calling it that and 16 percent of Republicans.

Ari Fleischer, who served as a White House press secretary under President George W. Bush, said Trump’s decision to buck precedent among GOP presidents and attend the march showed how politics have changed as the country has become more sharply polarized.

“In an age of polarization, where getting your base out in maximum numbers is the new form of effective politics, his visit makes perfect sense,” Fleischer said. “There used to be a [political] center, there used to be a lot more moderates, and politicians were mindful of them.”

Fleischer pointed to President Barack Obama announcing a personal shift to come out in support of same-sex marriage in 2012 as a past example of a president seeking to rally his base in an election year.

He added that for Trump, projecting an image of delivering on his agenda “is tremendously important. It’s a great foil and contrast to those who want to throw him out of office, a very vivid demonstration of the polarization — on one screen, they’re saying, ‘Throw the bum out,’ and on the other screen, he’s saying, ‘Look what I’m doing for you.’ ”

Still, try as he might to project a confident air, the president continued to reflect his anxiety over the impeaching proceedings, attacking Democrats on Twitter for “repeating, over and over again, the same old ‘stuff.’ ”

As he spoke on the Mall, his image appeared on a jumbo screen, the Capitol visible behind it — a stark reminder of his political troubles even as he sought to move past them.

Scott Clement contributed to this report.