US president Barack Obama took aim at Republican presidential frontrunner, Donald Trump, and accused critics of playing into the hands of Islamic State, in his last annual State of the Union speech to Congress.
The speech was meant to cement his legacy and set a positive tone for his final year in office.
Obama called for leaders to “fix” US politics and criticised candidates, such as Trump, for using anti-Muslim rhetoric that betrayed American values.
“When politicians insult Muslims ... that doesn’t make us safer,” he said, drawing applause from the crowd in the chamber of the House of Representatives.
“It’s just wrong. It diminishes us in the eyes of the world. It makes it harder to achieve our goals.”
Trump, whom Obama did not mention by name, is leading the Republican field ahead of the November 8 presidential election.
The billionaire businessman, citing national security, has called for a temporary ban on Muslims entering the United States and a wall on the border with Mexico, ideas the White House strongly opposes.
Obama contrasted his more optimistic view of America with those of Republican presidential candidates.
He said it was “fiction” to describe the country as economically in decline.
Obama acknowledged that al Qaeda and Islamic State, who control swaths of Iraq and Syria, posed a threat to Americans.
But he said comparing the effort to defeat the militants to World War Three gave the group just what it wanted.
“Masses of fighters on the back of pickup trucks, twisted souls plotting in apartments or garages: they pose an enormous danger to civilians; they have to be stopped.
"But they do not threaten our national existence,” Obama said.
Republicans say the president’s strategy to defeat Islamic State is flawed and insufficient.
“His policies aren’t working. He didn’t have an answer for how to defeat ISIS,” Republican House of Representatives speaker, Paul Ryan, said after the speech, using an acronym for Islamic State.
Obama’s address to lawmakers, Cabinet members and Supreme Court justices was one of his last chances to capture the attention of millions of Americans before the November election.
The next president will take office in January, 2017.
Trump, in a posting on Twitter, called the speech “boring” and lacking in substance. “New leadership fast!”
But South Carolina governor, Nikki Haley, who delivered the Republican response to Obama’s address, took her own jab at Trump and at other less moderate candidates in her party.
“During anxious times, it can be tempting to follow the siren call of the angriest voices. We must resist that temptation,” said Haley, the daughter of Indian immigrants.
“No-one who is willing to work hard, abide by our laws, and love our traditions should ever feel unwelcome in this country,” she said.
Obama, who is constitutionally barred from a third term, stuck to themes he hopes will define his legacy, including last year’s nuclear pact with Tehran.
He noted areas where compromise was possible with Republicans in Congress, including criminal justice reform, trade and poverty reduction.
He called for lawmakers to ratify a Pacific trade pact, advance tighter gun laws and lift an embargo on Cuba.
The president also said he regretted not having been able to elevate US political discourse.
“It’s one of the few regrets of my presidency — that the rancour and suspicion between the parties has gotten worse instead of better,” he said.
To help “fix” US politics, Obama pressed for an end to ‘gerrymandering,’ the practice of drawing voting districts in ways that give advantage to a particular party; reducing the influence of ‘dark money’, or political spending in which funding sources do not have to be disclosed; and making voting easier.
Obama also said he had tasked vice-president, Joe Biden, whose son died last year of cancer, with leading an effort to find a cure for the disease.
He pledged to continue to work to close the US prison at Guantanamo Bay, Cuba, and called on Congress to lift the embargo on the Communist-ruled island nation.
Obama, whose 2008 victory was driven partially by his opposition to the Iraq war, said the US could not serve as policeman of the world.
“We also can’t try to take over and rebuild every country that falls into crisis, even if it’s done with the best of intentions,” he said.
“It’s the lesson of Vietnam; it’s the lesson of Iraq; and we should have learned it by now.”