Former President Donald J. Trump moved on Friday to outflank Gov. Ron DeSantis of Florida as they wrestled for conservative loyalties at a gathering of right-wing activists in Philadelphia, pushing a shared agenda of forcing the federal government to the right, restricting transgender rights and limiting how race and L.G.B.T.Q. issues are taught.
Speaking hours after Mr. DeSantis’s address, Mr. Trump aimed to one-up his top rival by vowing to target federal diversity programs and to wield the power of the Justice Department against schools and corporations that are supposedly engaged in “unlawful racial discrimination.”
Mr. Trump said that, to “rigorously enforce” the Supreme Court’s ruling a day earlier rejecting affirmative action at the nation’s colleges and universities, he would “eliminate all diversity, equity and inclusion programs across the entire federal government.”
He added that he would direct the Justice Department “to pursue civil rights claims against any school, corporation, or university that engages in unlawful racial discrimination.”
A representative for Mr. Trump did not immediately respond to a request for comment on which races the former president thought were being subjected to discrimination.
Since entering the race just over a month ago, Mr. DeSantis has repeatedly sought to position himself to the right of Mr. Trump, hitting his record on crime, the coronavirus and immigration. Nevertheless, the former president leads Mr. DeSantis by a wide margin in the polls.
The rare convergence of the two leading Republicans on the campaign trail came at a convention of the newest powerhouse in social conservative politics, Moms for Liberty, which began as a small group of far-right suburban mothers but has quickly gained national influence.
A third presidential contender, Nikki Haley, the former governor of South Carolina, also spoke on Friday, with two others, Vivek Ramaswamy and Asa Hutchinson, slated to appear on Saturday.
Mr. DeSantis went first, headlining the opening breakfast event in a nod to the group’s founding in his home state in 2021. Its national rise — it says it now has 275 chapters in 45 states — has coincided with the Florida governor’s ascension in right-wing circles as he has pushed legislation to restrict discussions of so-called critical race theory, sexuality and gender in public schools.
“What we’ve seen across this country in recent years has awakened the most powerful political force in this country: mama bears,” Mr. DeSantis told the crowd of hundreds, to roars of applause. “We’ve done so much on these issues in Florida, and I will do all this as the next president.”
Shortly after he spoke, the Supreme Court gave the conservative movement more victories with two rulings, one striking down President Biden’s program to relieve student loan debt and the other backing a web designer who refused to provide services for same-sex marriages.
Mr. DeSantis’s pitch to social conservatives centers on the idea that he, not Mr. Trump, is the most likely to turn their priorities into legislation. In his 20-minute speech, Mr. DeSantis highlighted legislation he championed in Florida banning gender transition care for minors, preventing teachers from asking students for their preferred pronouns and prohibiting transgender girls from competing in girls’ sports.
Not all attendees were persuaded. Alexis Spiegelman, who leads the Moms for Liberty chapter in Sarasota, Fla., and is backing Mr. Trump for president, said she had not seen her governor’s policies translate into change at schools near her. She was critical of his presidential bid.
“I just don’t know why we would want a knockoff when we have the real, authentic Trump,” she said.
Ms. Haley, who served as United Nations ambassador in Mr. Trump’s administration, struck a different tone later Friday morning. Lacking the kind of recent legislative record that Mr. DeSantis can point to, she instead drew on her experiences as a mother: She directly called herself a “mom for liberty” and often invoked her children.
“Moms care about a lot of things — it’s not just schools,” Ms. Haley said. “We care about the debt, we care about crime, we care about national security, we care about the border. Moms care about everything.”
Calling itself a “parental rights group,” Moms for Liberty has built its platform on a host of contentious issues centering on children — a focus that many on the right believe could help unite the Republican Party’s split factions in 2024.
The group has railed against public health mandates related to the coronavirus and against school materials on L.G.B.T.Q. and race-related subjects. Its members regularly protest at meetings of school boards and have sought to take them over.
Along the way, Moms for Liberty has drawn a backlash. The Southern Poverty Law Center, a left-leaning civil rights organization, calls it an extremist group, saying that it “commonly propagates conspiracy theories about public schools attempting to indoctrinate and sexualize children with a progressive Marxist curriculum.” Moms for Liberty leaders rejected the label in remarks on Friday.
Before the group’s conference in Philadelphia, a half-dozen scholarly groups criticized the Museum of the American Revolution for allowing Moms for Liberty to hold some of its events there, including the opening reception.
Mayor Jim Kenney of Philadelphia, a Democrat, said on Thursday that “as a welcoming and inclusive city, we find this group’s beliefs and values problematic.”
Protesters gathered outside the conference venues beginning Thursday night, and demonstrations stretched into Friday evening.
The schedule for Saturday included a session led by KrisAnne Hall, a former prosecutor and conservative public speaker with past ties to the Oath Keepers, a far-right militia that helped orchestrate the Capitol attack on Jan. 6, 2021.
Sessions at the event bridged a wide range of subjects, including exploration of “dark money’s infiltration in education” and discussions about the Federalist Papers. But the presidential candidates were the main draw.
Tina Descovich, one of the organization’s founders, said in an interview that Moms for Liberty had invited every presidential candidate — including Mr. Biden — to speak at the event.
“Our issue of parental rights and our concerns about public education in America are rising to the level of presidential candidates,” Ms. Descovich said, “which means for the 2024 election, that we are working to make this the No. 1 domestic policy issue.”