WASHINGTON -- Pledging to empower America's "forgotten men and women," Donald Trump was sworn in as the 45th president of the United States Friday, taking command of a deeply divided nation and ushering in an unpredictable era in Washington. His victory gives Republicans control of the White House for the first time in eight years.

Looking out over the crowd sprawled across the National Mall, Trump painted a bleak picture of the nation he now leads, lamenting "American carnage," shuttered factories and depleted U.S. leadership. President Barack Obama, the man he replaced, sat behind him stoically.

Trump's address lasted just 16 minutes. While his inauguration did draw crowds to the nation's capital, the numbers appeared smaller than for past celebrations.

Demonstrations unfolded at various security checkpoints near the Capitol as police helped ticket-holders get through. After the swearing-in, more protesters registered their rage in the streets of Washington. Police in riot gear deployed pepper spray and made numerous arrests after protesters smashed the windows of downtown businesses, denouncing capitalism and Trump.

The new president's first words as commander in chief were an unapologetic reprisal of the economic populism and nationalism that fueled his improbable campaign. He vowed to stir "new national pride," bring jobs back to the United States, and "eradicate completely" Islamic terrorism.

"From this day forward, a new vision will govern our land. From this day forward, it's going to be only, 'America First,"' Trump said.

In one remarkable passage, Trump ripped into Washington's longtime leaders as he stood among them at the U.S. Capitol. For too long, he said, "a small group in our nation's capital has reaped the rewards of government while the people have borne the cost."

For Republicans eager to be back in the White House, there was little mention of the party's bedrock principles: small government, social conservativism and robust American leadership around the world. Trump, who is taking office as one of the most unpopular incoming presidents in modern history, made only oblique references to those who may be infuriated and fearful of his presidency.

"To all Americans in every city near and far, small and large from mountain to mountain, from ocean to ocean, hear these words: You will never be ignored again," he said.

The new president was sworn in by Chief Justice John Roberts, reciting the 35-word oath with his hand placed upon two Bibles, one used by his family and another during President Abraham Lincoln's inauguration.

Trump and wife, Melania, bid Obama and outgoing first lady Michelle Obama farewell as they departed the Capitol grounds in a government helicopter. Trump and Obama's political paths have been linked in remarkable ways. Before running for the White House, the billionaire businessman led efforts to promote falsehoods about the 44th president's citizenship and claim on the office.

Obama addressed a staff gathering at Joint Base Andrews before departing for a vacation in California. "You proved the power of hope," he said.

Trump's journey to the inauguration was as unlikely as any in recent American history. He defied his party's establishment, befuddled the media and toppled two political dynasties on his way to victory. His message, calling for a resurgence of white, working-class corners of America, was packaged in defiant stump speeches railing against political correctness. He used social media to dominate the national conversation and challenge conventions about political discourse. After years of Democratic control of the White House and deadlock in Washington, his was a blast of fresh air for millions.

But Trump's call for restrictive immigration measures and his caustic campaign rhetoric about women and minorities angered millions. And Trump's swearing-in was shadowed by questions about his ties to Russia, which U.S. intelligence agencies have determined worked to tip the 2016 election in his favour.

More than 60 House Democrats refused to attend his swearing in ceremony in the shadow of the Capitol dome. One Democrat who did sit among the dignitaries was Hillary Clinton, Trump's vanquished campaign rival who was widely expected by both parties to be the one taking the oath of office.

At a post-ceremony luncheon at the Capitol, Trump declared it was an honour to have her attend, and the Republicans and Democrats present rose and applauded.

At 70, Trump is the oldest person to be sworn in as president, marking a generational step backward after two terms for Obama, one of the youngest presidents to serve as commander in chief.

Trump takes charge of an economy that has recovered from the Great Recession but has nonetheless left millions of Americans feeling left behind. The nation's longest war is still being waged in Afghanistan and U.S. troops are battling the Islamic State in Iraq and Syria. The American health care system was expanded to reach millions more Americans during Obama's tenure, but at considerable financial costs. Trump has vowed to dismantle and rebuild it.

Trump faces challenges as the first president to take office without ever having held a political position or served in the military. He has stacked his Cabinet with established Washington figures and wealthy business leaders. Though his team's conservative bent has been cheered by many Republicans, the overwhelmingly white and male Cabinet has been criticized for a lack of diversity.

Before attending an inaugural luncheon, Trump signed his first series of orders, including the official nominations for his Cabinet. He joked with lawmakers, including House Democratic leader Nancy Pelosi, and handed out presidential pens.

In a show of solidarity, all of the living American presidents attended Trump's inaugural, except for 92-year-old George H.W. Bush, who was hospitalized this week with pneumonia. His wife, Barbara, was also in the hospital after falling ill.

AP writers Vivian Salama and Nancy Benac contributed to this report.

Reading on an app Tap here for the mobile experience.