Donald John Trump was sworn in Friday as the 45th president of the United States, after which he delivered a dark but ambitious speech promising to throw out entrenched Washington elites, end “American carnage” in cities and restore jobs lost to shuttered factories.

“Today, we are not merely transferring power from one administration to another, or from one party to another, but we are transferring power from Washington, D.C., and giving it back to you, the people,” Trump said.

He spoke on a day that featured less ceremony than usual, and crowds that seemed to be smaller than the ones that attended President Barack Obama’s inaugurations in 2009 and 2013. Trump’s parade rolled down Pennsylvania Avenue, passing crowds that often stood just two people deep. Elsewhere in downtown Washington, columns of peaceful protesters marched with anti-Trump signs, and small groups of black-clad anarchists clashed with police and set fire to trash cans and a limousine.

In his speech, Trump seemed to promise not just the obvious transition from Obama’s Democratic administration to full Republican control of Washington — but to a new style of politics, in which Trump will seek to be a new kind of independent power center.

Trump, 70, was administered the oath by Chief Justice John G. Roberts Jr., using two Bibles — one from President Lincoln’s inauguration, and another that Trump’s mother gave him in 1955. His wife Melania Trump stood at his side.

1 of 109 Full Screen Autoplay Close Skip Ad × The scene in Washington on Inauguration Day View Photos Trump supporters and protesters gather in the capital as a new presidency begins. Caption Trump supporters and protesters gather in the capital as a new presidency begins. Jan. 20, 2017 Keilaun Wilson of Columbia, S.C., sells T-shirts to Trump supporters leaving parties. Sarah L. Voisin/The Washington Post Buy Photo Wait 1 second to continue.

Then, as rain began to fall, Trump gave an inaugural address that — while short in duration — made a major break with presidential precedent. Most presidents use this moment to acknowledge the opponent they defeated, to praise America’s promise and to call upon both parties to work together.

Trump, by contrast, used his speech to make a wide-ranging condemnation of America’s current state — talking about “American carnage” caused by urban crime, and saying that “wealth, strength and confidence has dissipated” because of jobs lost overseas.

Trump charged that both major political parties have lost their way, serving the needs of an elite rather than the needs of the public. In grandiose language, Trump sought to cast this day as a kind of restart for American politics, with everything before — Republican and Democrat — cast aside.

“The United States of America is your country,” he said.

With now former president Obama and three previous presidents watching from behind him, Trump seemed to condemn them as unfaithful to the popular will, saying that his inauguration signaled that “the people” would rule the country again.

“For too long, a small group in our nation’s capital has reaped the rewards of government while the people have borne the cost,” Trump said. “Politicians prospered, but the jobs left and the factories closed.”

[‘I do solemnly swear…’: The 35 most momentous words Donald Trump will say at his inauguration]

(Sarah Parnass/The Washington Post)

It was a speech that closely matched the tone of Trump’s presidential campaign, which he cast as a populist insurgency against GOP orthodoxies.

But it was not as close a match with the way Trump has acted since the election — a time when he has chosen some of his Cabinet picks and top staffers from Washington and Wall Street’s existing elites. His choices have included the head of ExxonMobil, three retired generals, several top members of Goldman Sachs and several sitting GOP legislators.

“We assembled here today are issuing a new decree . . . From this day forward, a new vision will govern our land. From this day forward, it’s going to be only America first. America first!” Trump said. This two-word slogan, used heavily in Trump’s campaign, became infamous in U.S. history as the slogan of isolationist forces opposed to American entry in World War II. Trump has used it as an economic message.

“Every decision on trade, on taxes, on immigration, on foreign affairs, will be made to benefit American workers and American factories,” Trump said.

[A fierce will to win pushed Donald Trump to the top]

Trump’s speech clocked in at less than 17 minutes, making it unusually short among recent inaugural addresses. It concluded with the signature promise of his stunningly successful presidential campaign, to “make America great again.”

During the morning’s events, there were large crowds of protesters opposing Trump with signs and slogans — and some groups of black-clad anarchists who roamed District streets smashing windows of businesses and cars. Outside The Washington Post’s headquarters on K Street NW, a group of a few dozen anarchists hurled bricks and rocks at police, who responded with loud “flash-bang” grenades and streams of pepper spray.

D.C. Interim Police Chief Peter Newsham said officers have arrested more than 90 people in connection with protests that turned violent on Friday and caused “significant damage to a number of blocks in our city.”

He said a “a very small percentage” of the thousands who came to demonstrate against the inauguration resorted to violence.

“It’s disappointing that it had to happen. I’m extremely pleased how the [police] responded to this and took the folks responsible for this into custody.” Elsewhere in the city, news reports showed columns of peaceful protesters marching.

After the speech, before a traditional lunch at the Capitol, Trump signed three measures. One was a bill providing a waiver for James Mattis — a retired Marine general — to become secretary of defense, despite a law that prohibits that position going to recently retired military personnel. Trump also signed formal nominations, sending his Cabinet picks to the Senate.

At that ceremony, Trump appeared a slightly different politician than the flame-throwing populist he had been on the inaugural stage. He was in the middle of Washington’s elite, and enjoying their company. Trump joked with Congress’s two top Democrats, House Minority Leader Nancy Pelosi (Calif.) and Senate Minority Leader Charles E. Schumer (N.Y.) about the prospects that his choices would be confirmed.

At one point, Trump seemed unsure of whom he was nominating for what office.

“Ah, Betsy,” Trump said, looking at one sheet he was to sign. “Education, right?”

He looked to House Speaker Paul D. Ryan (R-Wis.) and House Majority Leader Kevin McCarthy (R-Calif.), seemingly for confirmation.

“Yes,” McCarthy said. It was, indeed, the nomination of Betsy DeVos to be Trump’s secretary of education.

Trump also signed a proclamation declaring a national day of patriotism, new White House spokesman Sean Spicer said in a tweet. In recent years, other presidents have declared Sept. 11 of each year “Patriot Day,” in commemoration of the 2001 terrorist attacks. It was not immediately clear whether Trump’s proclamation was a repeat of that tradition, or a new tradition on a different day.

As he entered the lunch, Trump appeared to shake the hand of his Democratic opponent, former secretary of state Hillary Clinton, whom he made no mention of in his inaugural address.

“How are you? Thank you for coming. Thank you,” Trump said.

Later, at the same luncheon, Trump asked both Hillary Clinton and her husband, former president Bill Clinton, to stand and be applauded.

As the lunch ended, the Clinton’s headed toward the exit, walking alongside the statues.

Hillary Clinton, when asked by The Post what she thought of the speech, paused, smiled and lightly tapped a reporter’s arm.

“Hi, how are you?” she said. And then she disappeared around the entrance, out and away as Trump continued to greet lawmakers.

Trump’s swearing-in now gives Republicans control of both the White House and Congress for the first time since 2006. The new president has promised to undo some of the most significant pieces of Obama’s legacy — including his signature health-care law. But Trump also enters office with a significant amount of uncertainty, since he has repeatedly contradicted other Republicans — and himself — on major questions about how immigration, taxes, health care and other issues will be handled in the new administration.

On the Internet, there were other signs of the seismic shift in power. The White House Web page — which that morning had touted Obama’s initiatives to slow climate change — now touted a promise from Trump to eliminate “harmful and unnecessary policies such as the Climate Action Plan.”

The Trump administration’s website also promised to be more pro-police than the Obama administration, under which the Justice Department investigated misdeeds in local departments. There was also, seemingly, a nod to Trump’s open attitude toward Vladi­mir Putin’s Russia — whose intelligence agencies reportedly sought to intervene in the 2016 election to boost Trump’s chances.

“The world must know that we do not go abroad in search of enemies, that we are always happy when old enemies become friends, and when old friends become allies,” the White House website said.

[Trump keeps Obama appointee tasked with helping run the war against ISIS]

After the speech, new White House counselor Stephen K. Bannon — the former head of the right-wing website Breitbart News — said in an interview that Trump’s speech had echoes of another long-ago American populist.

“It was an unvarnished declaration of the basic principles of his populist and kind of nationalist movement. It was given, I think, in a very powerful way. I don’t think we’ve had a speech like that since Andrew Jackson came to the White House,” Bannon said. “But you could see it was very Jacksonian. It’s got a deep, deep root of patriotism there.”

Unspoken, however, was that Trump’s speech seemed to pull the GOP away from the policy positions that had mattered deeply until Trump came onto the scene. The party of free trade had been declared the party of economic nationalism. A party of Russia hawks had been rebranded as a party open to friendship with “old enemies.”

“He keeps telling us, ‘This is who I really am.’ And people say, ‘Yeah, but who are you really?’ He goes, ‘Well, this is who I really am,’” said former House speaker Newt Gingrich (R-Ga.), a longtime fixture in the Washington political and pundit establishment who has become and enthusiastic backer of Trump’s attack on it. “He’s so different from what you guys are used to covering.”

Gingrich was asked: How will Trump, who lost the popular vote, work with Washington’s existing power structure?

“He runs over it. I don’t think he gets cooperation,” Gingrich said. “The only way he’s going to get those goals is to go to the American people over and over. I suspect that he’ll end up by spring having to go back out and have huge rallies and try to [bring] grass-roots pressure to bear.”

Signs of the transfer of power were on display throughout the day.

Before 9:30 a.m., TV footage showed Obama leaving the Oval Office for the last time, before he and the first lady held a pre-inauguration tea with the Trumps. Obama smiled as he walked down an exterior hallway, in view of cameras. “Any last words for the American people?” a member of the press called out. “Thank you,” Obama said.

Soon after, the Trumps arrived at the White House, greeting the Obamas and presenting them with a gift — a box wrapped in the distinctive light blue of high-end jeweler Tiffany & Co.

The meeting at the White House between Trump and Obama marked an Inauguration Day tradition, but one made more unusual this time by the two men’s history.

Trump, a real estate businessman and reality-TV star, began his rise in conservative politics by essentially calling Obama a liar and an illegitimate president: Trump insisted for years that Obama was born in Kenya. Obama was actually born in Hawaii, as Trump conceded late in the 2016 campaign. Obama, in turn, had mocked Trump at a televised White House Correspondent’s Association dinner in 2011.

Now, they met at the White House door, one going in and one going out.

On the White House steps, the bitter history between Trump and Obama went unmentioned. Obama asked Trump, “How was church?” and they turned to go inside.

The two men and their wives took a motorcade to the U.S. Capitol, through empty streets.

Around them, there were sporadic clashes between police and protesters around Washington. In several instances, news video showed black-clad protesters — some carrying symbols of “anarchist” groups — smashing shop windows and overturning newspaper boxes.

[Two worlds collide: Trump backers and foes trade barbs in Washington]

Before meeting with the Obamas, the Trumps attended a service at St. John’s Episcopal Church near the White House, continuing an Inauguration Day tradition. One of the preachers was Robert Jeffress, a Southern Baptist minister who is pastor of a Dallas megachurch, and who has made inflammatory condemnations of both Mormonism and Islam in the past.

Jeffress, who grew close to Trump during the 2016 presidential campaign, said on Twitter that his sermon would be entitled, “When God Chooses a Leader.” Trump left the service about 9:30 a.m. He mouthed “Thank you” to supporters as he climbed into an SUV.

[Live updates on the inauguration of Donald Trump]

Trump takes office as the least-popular new president in 40 years, according to a new Washington Post-ABC News poll. Forty percent of Americans view Trump favorably, which is 21 points lower than the rating with which Obama will leave office.

But Trump won the election and this is his day to command.

“It all begins today!,” Trump tweeted early Friday morning. “I will see you at 11:00 A.M. for the swearing-in. THE MOVEMENT CONTINUES - THE WORK BEGINS!”