WASHINGTON -- President Barack Obama took the oath of office for the second time in as many days on Monday, this time before an estimated 800,000 revellers who cheered on his stirring appeal for Americans to come together and fight for the cherished American principles of justice and equality.

Obama's public swearing-in at the majestic Capitol building, featuring pop star Beyonce singing the national anthem, took place on the national holiday devoted to revered civil rights leader Martin Luther King Jr.

The wife of Medgar Evers, another slain civil rights leader, delivered the invocation at the second inauguration of the country's first African-American president. Myrlie Evers-Williams spoke of "witnesses -- unseen by the naked eye, but all around us -- thankful that their living was not in vain."

Obama embraced his wife and daughters after he swore the oath of office. The crowd roared its approval.

The president then delivered a spirited, substantive 19-minute address that touched on his administration's priorities and re-established his commitment to liberal, Democratic values, including his belief that government can be a positive force in the lives of citizens.

Obama didn't shy away from some of the most hot-button debates currently raging in the United States, including immigration reform, gun control, climate change and same-sex marriage.

"Our journey is not complete until our wives, our mothers, and daughters can earn a living equal to their efforts," he said to an eruption of cheers and applause.

"Our journey is not complete until our gay brothers and sisters are treated like anyone else under the law -- for if we are truly created equal, then surely the love we commit to one another must be equal as well."

It was the first time any U.S. president has mentioned gay rights in an inaugural address. Obama also referred to voter disenfranchisement, a particular problem for African-American voters in Florida in November.

"Our journey is not complete until no citizen is forced to wait for hours to exercise the right to vote," he said. "Our journey is not complete until we find a better way to welcome the striving, hopeful immigrants who still see America as a land of opportunity."

When Obama made his way back into the Capitol building after making his outdoor address, he turned back to look out at the flag-waving crowd. He appeared visibly moved.

"I want to take a look one more time," he said as he stopped to survey the hundreds of thousands who turned out to show their support. "I'm not going to see this again."

Obama and his wife, Michelle, then sat down for lunch with congressional leaders. Video of Michelle Obama apparently rolling her eyes dismissively at John Boehner, speaker of the House of Representatives, swiftly went viral.

The couple later headed to a series of inaugural balls held across the U.S. capital.

"Just danced to 'Let's Stay Together' with the love of my life and the president of the United States. I'm so proud of Barack," Michelle Obama tweeted on Monday night.

A day earlier, Obama was sworn in by John Roberts, chief justice of the U.S. Supreme Court, during an intimate ceremony at the White House. That's because the U.S. Constitution requires presidents take the oath of office on Jan. 20; when it falls on a Sunday, the public festivities are held the next day.

One of Obama's appointees to the Supreme Court, Sonia Sotomayor, administered the oath to Vice President Joe Biden on Monday as the president beamed. Roberts, who famously flubbed the oath of office in 2009, swore in Obama this time without any hitches -- it was the president, in fact, who briefly stumbled over the words "United States."

As the inaugural festivities played out on Capitol Hill, hundreds of people were gathered just down the street at the Canadian embassy to watch history unfold. The party at 501 Pennsylvania Avenue, hosted by Ambassador Gary Doer, was one of the hottest tickets in the U.S. capital given its close proximity to the Capitol building.

It boasts a stunning view of the action from its sixth-floor rooftop patio.

Foreign Affairs Minister John Baird and some American VIPs were among those in attendance noshing on BeaverTails, poutine, Tim Hortons coffee and Crown Royal cocktails, among other Canadian fare.

Obama begins his next four years in office amid far different circumstances than he did in 2009, when his soaring messages of hope and change dared millions of Americans to dream that their country could be the better, brighter place that King himself envisioned decades earlier.

And yet the commander-in-chief now presides over a bitterly divided U.S. Congress, although the dramatically changing face of America, in particular the growing number of Hispanic voters, helped to decisively propel him to a second victory in November.

The president's first term kicked off as a devastating economic recession was taking hold, thwarting some of his loftiest legislative goals and compelling his administration to spend billions in efforts to ward off a full-fledged depression.

It's also been marked by nasty partisan brawling incited largely by a Republican opposition that made no bones about its determination to put the brakes to Obama's legislative agenda at every turn. They also vowed to deny him a second term, an ultimately fruitless mission.

Obama made pointed reference to the congressional warfare in his inaugural address.

"Progress does not compel us to settle centuries-long debates about the role of government for all time -- but it does require us to act in our time," he said in his address.

"Decisions are upon us, and we cannot afford delay. We cannot mistake absolutism for principle, or substitute spectacle for politics, or treat name-calling as reasoned debate."

At the congressional lunch, he took a gentler stance.

"I recognize democracy is not always easy," he said. "I recognize there are profound differences in this room." But, he added: "I'm confident we can act in way that makes a difference for our children."

In the past four years, Obama has had major successes -- the president managed to do what so many in the Oval Office had failed to achieve, passing a sweeping overhaul to the country's health-care system that provided health insurance to millions of Americans. He also authorized the successful Navy SEALs raid that finally captured and killed Osama bin Laden, the al-Qaida mastermind behind 9-11.

There were failures -- Obama did next to nothing on immigration reform, failed to close the Guantanamo Bay military prison as promised and was utterly unable to make deals with Boehner on taxes, spending cuts, the debt ceiling and the so-called fiscal cliff.

And there were tragedies, most notably a series of horrific mass shootings -- one that almost killed a Democratic congresswoman, another that left 12 dead in a Colorado movie theatre and, perhaps the most heinous of all, the massacre of 20 young schoolchildren in small-town Connecticut last month.

Indeed, the carnage in Newtown, Conn., at the hands of a troubled young man toting his mother's assault rifle shook the president to his core. It's resulted in a renewed White House push for gun control that seems certain to be a hallmark of Obama's second term.

After four difficult years of governing, a greyer, more sombre Obama addressed the crowd on Monday.

In addition to gun control, the next four years will also include a major push for immigration reform from the White House. The Obama administration wants a sweeping bill that would include a path toward citizenship for millions of illegal immigrants already living stateside.

Obama will also face continuing pressure to bring the country's US$16 trillion national debt to heel. There will also be a decision in the weeks to come on the fate of TransCanada's Keystone XL pipeline.

Obama touched on climate change in his address in remarks that delighted American environmentalists. Keystone XL opponents are urging him to nix the project because they insist Alberta's carbon-intensive oilsands will contribute significantly to global greenhouse gas emissons.

"Some may still deny the overwhelming judgment of science, but none can avoid the devastating impact of raging fires, and crippling drought, and more powerful storms," the president said.

"The path towards sustainable energy sources will be long and sometimes difficult. But America cannot resist this transition; we must lead it. That is how we will preserve our planet, commanded to our care by God."

There are myriad issues confronting Obama on the international front.

Israel continues to pressure the White House to launch military action against Iran in order to stop it from building nuclear weapons. There's also an ongoing civil war in Syria, increasingly tense U.S.-Russia relations, hostilities between Israelis and Palestinians and trade disputes with China.