Media playback is unsupported on your device Media caption Five key points from Obama's State of the Union speech

President Barack Obama has vigorously defended his legacy while striking an optimistic note for America's future in his final State of the Union address.

He criticised the negative tone of the current presidential race, arguing the US has the "strongest, most durable economy in the world".

"Anyone claiming that America's economy is in decline is peddling fiction," Mr Obama told lawmakers in Washington.

Republican presidential hopefuls attacked many of his assertions.

And South Carolina Governor Nikki Haley said in the party's official response his record "had fallen short of his soaring words".

Mr Obama's speech to Congress highlighted what he saw as his achievements in office, such as health reform.

This will be an address remembered not for its policy prescriptions, but for its upbeat assessment of how much better America is today than when Barack Obama came to office, BBC North American editor Jon Sopel says.

He adds that with just a year to go and a Republican Congress, there is neither the time nor the votes to get much done.

'Fixing politics'

"For my final address to this chamber, I don't want to talk just about the next year. I want to focus on the next five years, 10 years, and beyond," President Obama said.

"I want to focus on our future."

How Republican presidential hopefuls saw it

"The State Of The Union speech was one of the most boring, rambling and non-substantive I have heard in a long time," tweeted frontrunner Donald Trump.

For Ted Cruz the speech was "less a State of the Union and more a state of denial".

"While Isis [Islamic State] is beheading people and burning them in cages he [President Obama] says climate change is our greatest threat," said Marco Rubio in a video response.

"Safer? Isis on the rise. North Korea testing nukes. Syria in chaos. Taliban on march. This president is living in a different world," said Jeb Bush.

"Despite his rhetoric, Americans know that our economy is lagging, our leadership in the world is waning, and the very character of our nation is threatened," wrote Carly Fiorina on Facebook.

He rejected suggestions by politicians and commentators that America's economy is getting weaker.

However, he added: "What is true - and the reason that a lot of Americans feel anxious - is that the economy has been changing in profound ways."

Mr Obama focused on the need to tackle income inequality, use technology to combat climate change and maintain national security while not becoming mired in foreign conflicts.

Image copyright Getty Images Image caption Both houses of Congress attended Mr Obama's annual address

Image copyright Getty Images Image caption Mr Obama mentioned the work of new House Speaker Paul Ryan in his speech

Media playback is unsupported on your device Media caption Barack Obama: "When politicians insult Muslims, when a mosque is vandalized, or a kid is bullied, that doesn't make us safer"

He called on voters and politicians to change the divisive tone of politics and to "change the system to reflect our better selves".

Mr Obama said a major regret of his presidency was that Republicans and Democrats had become more hostile towards each other.

"Our public life withers when only the most extreme voices get all the attention," he said.

And he took indirect aim to Republican presidential front-runner Donald Trump who has been criticised for his comments about Muslims and immigrants.

"When politicians insult Muslims, when a mosque is vandalised, or a kid bullied, that doesn't make us safer," Mr Obama said.

"That's not telling it like it is. It's just wrong... And it betrays who we are as a country."

In the year ahead, Mr Obama said he wanted to:

close the Guantanamo Bay prison

achieve meaningful criminal justice reform

address rising tide of prescription drug abuse

authorise the use of military force against IS

lift the embargo on Cuba

He also announced a new national cancer research initiative that Vice-President Joe Biden will be leading.

He only mentioned guns briefly, despite a recent policy push for executive actions on gun control, though a chair was left empty in the chamber to symbolise victims of gun violence.

Image copyright AP Image caption Ms Haley said the president's words do not match his record

Mrs Haley said Mr Obama "spoke eloquently about grand things", but that his "record has fallen short of his soaring words".

"During anxious times, it can be tempting to follow the siren call of the angriest voices. We must resist that temptation," the South Carolina governor said, likely referring to Mr Trump but not mentioning him by name.

She said Republicans must recognise their role in the declining trust in government in the US.

"We have big decisions to make. Our country is being tested," she said.

"But we've been tested in the past, and our people have always risen to the challenge."

US media reaction to the speech

The New York Times editorial: "A reminder that the optimism that made him the first African-American president and then the resilience that helped the nation weather economic and global crises over the past seven years are what position it best for the future."

Doyle McManus in The Los Angeles Times: "On the economy, technology, foreign policy - and even the prospects for a more conciliatory bipartisan political sphere - the president declared himself an undaunted optimist."

Fox News commentary: "The president delivered his seventh and final State of the Union address as he faces an invigorated opposition in both houses of Congress and the prospect of his policies becoming unravelled if a Republican wins the White House in November - his administration, though, is still trying to deliver on promises made since his first inauguration: Most notably, the vow to close the Guantanamo Bay prison camp."

Greg Jaffe in The Washington Post: "Much of his impassioned, rising rhetoric revisited initiatives that have struggled to take hold during his time in office, including his early effort to repair US relations with the Islamic world."

Susan Page in USA Today: "In his seventh State of the Union address, Obama limited the laundry list of legislation proposals that marked his first six - an acknowledgment, perhaps, that he no longer has the political juice to get much done, especially with a Republican Congress."