WASHINGTON - President Barack Obama knocked Republican presidential candidates for anti-Muslim rhetoric and accused critics on Tuesday of playing into the hands of Islamic State in a speech aimed at setting an optimistic tone for his last year in office.
Obama, delivering his last State of the Union speech to Congress before leaving office next year, said it was fiction to declare the United States was in economic decline or getting weaker on the international stage.
In a direct slap at Republican presidential front-runner Donald Trump, Obama said insulting Muslims hurt the United States and "betrayed" its identity.
"When politicians insult Muslims ... that doesn't make us safer," he said, drawing applause from the crowd in the House of Representatives chamber.
"It's just wrong. It diminishes us in the eyes of the world. It makes it harder to achieve our goals." Businessman Trump is leading the Republican field in the race for the Nov. 8 election to replace Obama. Trump has called for a temporary ban on Muslims entering the United States and a wall on the US border with Mexico to stop the flow of illegal immigrants, ideas Obama strongly opposes.
The Democratic president said critics played into Islamic State's hands by comparing the fight against the militant group to World War Three, even as he acknowledged that the group and al Qaeda posed a direct threat to the American people.
"Masses of fighters on the back of pickup trucks and twisted souls plotting in apartments or garages, they pose an enormous danger to civilians and must be stopped. But they do not threaten our national existence," Obama said.
The remarks were a repudiation of criticism of his strategy against Islamic State, which Republicans have called insufficient.
Obama's address comes as 10 sailors aboard two US Navy boats were taken into Iranian custody. Iran told the United States the crew members would be "promptly" returned, US officials said. The event gave Republicans further fodder to criticise Obama's nuclear deal with Tehran.
Obama did not address the issue in his speech. The White House expects the situation to be resolved quickly.
The address was one of Obama's few remaining chances to capture the attention of millions of Americans before November's election of a new president who will take office next January.
South Carolina Governor Nikki Haley, who is delivering the Republican Party's response to Obama's address, will knock his record on fiscal and foreign policy while delivering a not-so-subtle jab at Republican presidential candidates such as Trump.
"During anxious times, it can be tempting to follow the siren call of the angriest voices. We must resist that temptation. No one who is willing to work hard, abide by our laws, and love our traditions should ever feel unwelcome in this country," she will say, according to excerpts of her remarks.
Haley is the daughter of Indian immigrants.
Obama stuck to themes he hopes will define his legacy.
He emphasised 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 during his time in office.
To help "fix" US politics, Obama pressed for an end to"gerrymandering," the practice of drawing voting districts in ways that gives 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, to lead an effort to find a cure for the disease.
Politics loomed over the speech.
Obama is eager for a Democrat to win the White House to preserve his legacy, but anger over his policies and fears about security threats have helped push non-traditional candidates to the fore in the Republican and, to a lesser extent, the Democratic races to succeed him.
Self-described "socialist" Bernie Sanders, a US senator from Vermont is giving former Secretary of State Hillary Clinton tough competition in early voting states for the Democratic primary contest.