Thousands of people gathered on the National Mall on Sunday for a daylong rally blending Christian prayer and political fervor, a gathering President Trump had touted as an opportunity to “rededicate America as one nation under God.”

The crowds came to the heart of Washington to hear from spiritual and elected leaders and members of Mr. Trump’s cabinet. Secretary of Defense Pete Hegseth appeared in a recorded video message, early in the day, exhorting the crowd to “pray without ceasing,” a phrase that appears in the New Testament.

He recounted an apocryphal account of President George Washington praying at Valley Forge in the winter of 1777-1778, a moment that has become a touchstone for some Christians who argue that the founders envisioned America as an explicitly Christian nation.

“Let us pray for our nation on bended knee and let us ask our Lord and savior Jesus Christ, as Washington did on that momentous day, so help us God,” Mr. Hegseth said, to cheers from the crowd.

With speeches and Christian music performed on a Sunday against a symbolically potent backdrop at the heart of American government, the rally aims to crystallize the narrative that the nation’s founding was an intentionally Christian project, a framing disputed by many scholars. The separation of church and state has long been a bedrock principle of American democracy. The First Amendment states that “Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof.”

Attendees waited in an hourslong line along the Mall between the Washington Monument and the Capitol Building to enter as Christian worship music wafted from the stage. Inside the event space, many in the crowd raised their hands in praise, with some waving flags and banners in ecstatic expressions of worship. Some had laid out blankets on the lawn, where they picnicked, read from Bibles and prayed in small groups.

“Events like this let us see that we’re not alone,” said Teresa Johnson-Hernandez, who is running for the Texas House of Representatives as a Republican in the border district of Laredo on a platform that includes “biblical beliefs and family values,” as she described it.

Onstage in the morning session, evangelical pastors prayed and preached against a stage whose backdrop included large lancet cutouts reminiscent of Gothic church windows.

“When you look at American history, you can see God has been at the center of our nation since its founding in 1776,” Gary Hamrick, a pastor from Virginia, told the crowd.

“Today, friends, we are in a spiritual war,” he continued. “This is a battle in our day between good and evil, between right and wrong, between truth and lies, between light and darkness.”

Mr. Trump is expected to give a video message, and other speakers include members of the highest levels of government, including Secretary of State Marco Rubio and House Speaker Mike Johnson, who have both stressed the priority of Christian faith in public life. The event’s online stream advertised that Vice President J.D. Vance would also be speaking, although he was not listed in the program.

The rally, the main religious event of the Trump administration’s 250th anniversary plans, reflects the political success of a right-wing Christian movement that has intensified efforts to end the separation of church and state.

Many of the country’s founders were Christians, and references to religion are present in many of their writings. The role of Christianity in America’s founding is complex, however, and partisans have used historical data points and texts to bolster their political positions for decades.

But the idea that the founders saw America as an explicitly Christian nation is “nonsensical” and “dead wrong,” said Joseph Ellis, the Pulitzer Prize-winning historian and author of many books on America’s founding.

Instead, the founders were explicitly pushing back against an assumption that persisted through the Middle Ages, that states needed common religious preference to unite people, he said.

“It is a falsification of the meaning of the American Revolution,” he said.

Conservative Christians have long used educational programs, political activism and reimagined iconography to advance the view that America was founded as a Christian nation. Intensity around this narrative has grown as the share of Christian Americans has declined.

Mr. Trump rose to office promising to give Christianity power, and his rallies increasingly fused evangelical worship and political grievance, as right-wing political activity became a kind of holy act for many of his supporters.

In the second Trump administration, Christian worship has become routine inside the White House, and Republican power brokers have infused their public responsibilities with a sense of Christian mission. Mr. Hegseth has invoked divine purpose to justify American military power, and prayed to “King Jesus” at a White House dinner.

Mr. Johnson, who is expected to close the prayer rally, has argued that separation of church and state is “misunderstood,” and that “the Founders wanted to protect the church from an encroaching state, not the other way around.”

The prayer event again shows that the separation of church and state is “under extreme attack,” said Rachel Laser, president of Americans United for Separation of Church and State, which has filed seven lawsuits against the administration related to its turn toward Christianity.

“If Trump really wanted to celebrate what is unique and foundational about America he’d be celebrating our promise of church-state separation and religious freedom for all,” she said.

American adults largely do not want Christianity to be the country’s official religion, but over the past two years, those who do want it to be has to increased from 13 to 17 percent, according to a recent survey from the Pew Research Center.

Republicans are far more likely than Democrats to want the federal government to make Christianity the country’s official religion, the survey found.

Thousands of people attended, although the space allotted for event on the Mall was not full as the event headed into its third hour.

Set against the iconic backdrop of the Washington Monument and the Capitol, the highly produced event also offers a chance for outsize reach online through conservative Christianity’s powerful social media presence.

The long-planned rally is almost entirely evangelical in character, and does not include a broad representation of Christianity or the scope of American religion. On May 4, Mr. Trump signed a proclamation calling for Jews to also observe a “national Shabbat” this same weekend.

Rabbi Meir Soloveichik, an Orthodox rabbi from New York and the only Jewish leader on the roster, took the stage in the afternoon to tell the story of Irving Berlin, a Jewish immigrant from Russia, writing the song “God Bless America.”

The song is “a reminder that antisemitism is utterly un-American,” he said, to sustained applause.

The next speaker, Sen. Tim Scott, drew even louder applause when he opened his speech by asking, “How many of you love Jesus?”

The list of speakers includes no Muslims, at a moment when anti-Muslim hostility is on the rise in many parts of the country. The first Muslims arrived in what is now the United States before the nation’s founding via the trans-Atlantic slave trade.

The event “sharpens the distinction between people who belong and people who don’t belong,” said Asma T. Uddin, an assistant professor at Michigan State University College of Law who has written about Muslims and religious freedom in the United States.

“This idea of the U.S. as Christian nation and a place that has always been fundamentally Christian erases the long histories of other religious communities in this country,” she said.

Some faith traditions are observing America’s anniversary on their own terms, without political fanfare. Next month, the U.S. Catholic bishops, who have devoted extensive efforts to standing up for immigrants during the Trump administration’s aggressive deportation campaign, will celebrate a mass in Orlando, Fla.

Cardinal Robert McElroy, the Roman Catholic archbishop of Washington, said in a recent interview that language describing America as a Christian nation “can be destructive,” especially when it’s used to center culture around the exclusion of certain groups.

Some 80 years ago, Catholics were routinely excluded in American public life, he said.

“They wouldn’t say, this is a Christian nation, they’d say, it is a Protestant nation,” he said.