LANGLEY, Va. — President Donald Trump moved to mend his tumultuous relationship with America’s spy agencies Saturday, traveling to CIA headquarters on his first full day in office and assuring officials, “I am so behind you.”

But the president quickly shifted from praise for the CIA to criticism of media coverage of Inauguration Day, in an unscripted address that overstated the size of the crowd that gathered on the National Mall as he took the oath of office. Trump said throngs “went all the way back to the Washington monument,” despite photos and live video showing the crowd stopping well short of the landmark.

The president’s media criticism came as he stood in front of a memorial honoring CIA officers killed while serving the United States.

READ NEXT: Comparison: Donald Trump and Barack Obama’s inauguration crowds

Trump’s decision to visit CIA headquarters just outside of Washington was aimed at making a public gesture to the intelligence officials he disparaged during the transition. He had repeatedly challenged the agencies’ assessment that Russia meddled in the presidential race to help him win and suggested intelligence officials were behind the leak of an unverified dossier that claimed Russia had collected compromising financial or personal information about him.

During remarks to about 400 CIA officials, Trump denied that he had a feud with the intelligence community, saying it was “exactly the opposite.” He again blamed the media for creating that impression, despite the fact that he made numerous public statements critical of intelligence officials.

“There is nobody that feels stronger about the intelligence community and CIA than Donald Trump,” he said. “There’s nobody.”

The 45th president’s inauguration has been shadowed by news reports that the CIA and other federal agencies are investigating Russian interference in the presidential election on behalf of Trump. The New York Times, citing anonymous officials, said agencies were examining intercepted communications and financial transactions between Russian officials and Trump’s associates.

FBI Director James Comey has declined to confirm or describe the nature of the government’s investigation, both during a congressional hearing and in closed-door meetings with members of Congress.

Saturday marked the end of three days of inaugural celebrations, with Trump and his family attending a national prayer service traditionally held for the new president. The president and his wife, Melania, and Vice President Mike Pence and his wife, Karen, sat in a front pew at Washington National Cathedral for the morning service.

The interfaith service is a tradition for new presidents and is hosted by the Episcopal parish. But the decision to hold a prayer session for Trump sparked debate among Episcopalians opposed to his policies.

Bishop Mariann Budde of the Episcopal Diocese of Washington wrote in a blog post that while she shared “a sense of outrage at some of the president-elect’s words and actions,” she felt an obligation to welcome all people without qualification, especially those who disagree and need to find a way to work together.

The service took place as throngs of women, many of them wearing bright pink, pointy-eared hats, descended on the nation’s capital and other cities around the world Saturday for marches organized to push back against the new president. The presidential motorcade sped past the protesters.

Officials said the crowd in Washington for the women’s march could be more than half a million people, more than double expectations. The event appeared to have attracted more people than Trump’s inauguration, based on figures from transportation officials.

Trump arrived at the cathedral mid-morning. The service included readings and prayers from Protestant, Jewish, Sikh, Mormon, Buddhist, Roman Catholic, Baha’i, Episcopal, Hindu and Native American leaders. But the program was remarkable for the large number of evangelicals participating, including two former presidents of the Southern Baptist Convention, the country’s largest evangelical denomination. Several speakers had served as Trump advisers and supporters who spoke at the Republican National Convention.

Trump, a Presbyterian, is not a regular churchgoer. He does not attend weekly services in New York, but worships every Christmas at a church near his estate in Palm Beach, Florida. Trump courted evangelical voters during the presidential campaign and infused his inaugural address with references to God and quoted from the Bible’s book of Psalms during a call for national unity.

The president’s family joined him at the White House for his first weekend in office. His daughter Ivanka and her husband, senior White House adviser Jared Kushner, were seen snapping photos Saturday on the Truman balcony with a young girl who appeared to be their daughter.

The Justice Department released a memo concluding the president’s “special hiring authority” allows the New York real estate mogul to appoint Kushner to the administration and the move does not contravene federal anti-nepotism laws.

AP Religion Writer Rachel Zoll in New York and Associated Press writers Jonathan Lemire and Darlene Superville contributed to this report.