Image copyright Reuters Image caption Protesters march toward a New York police station after a man was killed by police in Brooklyn

President Barack Obama has said race relations in the US are better now than when he took office, despite nationwide protests over police actions.

Mr Obama told broadcaster NPR in a wide-ranging interview that he thinks "the issue has surfaced in a way that probably is healthy".

Demonstrations have followed the killing by police of several unarmed black men and boys in 2014.

On Sunday, New York City's police chief said officers feel under attack.

Police Commissioner Bill Bratton said rank-and-file officers and much of America's police leadership are feeling pressure "from the federal government at the highest levels".

"See us. See the police. See why they have the anxieties and the perceptions they have," he told US broadcasters.

What else Obama said:

Image copyright AP

Iran: Nuclear deal possible if Iran recognises it's in its own interests - prove to the world it's not interested in developing a nuclear weapon and sanctions will be removed, economy will grow

Healthcare reform: Came at a "significant political cost" but now paying off with millions more covered and slower rise in healthcare costs

Economy: Lower deficit, strong growth in output and jobs, wages "ticking up" for first time, low inflation, high energy production high

Mid-term thrashing: Partly because Democratic party didn't proclaim its record of achievement loudly enough

Cuba policy: A year of negotiations with Cuba and Vatican persuaded him "this would be good for the Cuban people and more likely to lead to a loosening up of the restrictions or oppression that exists there"

Congress: Agreement possible in some areas now Republicans have to show they can govern, but he's ready to veto if needed

Burma elections: The "experiment may go haywire" if different ethnic groups can't unite and military clings to power

Both Eric Garner and Michael Brown were killed by on-duty police officers who were later not charged over the deaths, sparking nationwide protests over perceived police injustices.

In the NPR interview, Mr Obama said such cases "attract attention" but the issue of "police and communities of colour being mistrustful of each other is hardly new".

"I assure you, from the perspective of African Americans or Latinos in poor communities who have been dealing with this all their lives, they wouldn't suggest somehow that it's worse now than it was 10, 15 or 20 years ago."

Mr Obama said he thought day-to-day interactions in the US were "less racially divided" and protests over police treatment of minorities was an encouraging sign.

"I think that the fact that there's a conversation about it and that there are tools out there that we know can make a difference in bridging those gaps of understanding and mistrust should make us optimistic."

Image copyright Getty Images Image caption Supporters visit two memorials created at the site of Michael Brown's death

Image copyright Reuters Image caption Police turn their backs on New York Mayor Bill de Blasio at a funeral

The apparent schism between people supporting the police and those supporting the protesters has been most sharply felt in New York.

Some police officers turned their backs on Mayor Bill de Blasio during the funeral for Rafael Ramos, a police officer killed sitting in his vehicle.

They are unhappy with the way they think the mayor has sided with protesters in some of his remarks after the death of Mr Garner, but their behaviour was criticised by their boss.

"That funeral was held to honour Officer Ramos," Mr Bratton said. "And to bring politics, to bring issues into that event, I think, was very inappropriate."

Ramos and Wenjian Liu were shot and killed by Ismaaiyl Brinsley, who had a lengthy police record and mentioned the killings of Eric Garner and Michael Brown in social media posts before he shot the officers.

Meanwhile in Ferguson, Missouri, where teenager Michael Brown was killed, a police officer has been suspended after calling a memorial for Brown at the spot he was killed "a pile of trash".

City officials said negative remarks about the memorial "do not reflect the feelings of the Ferguson Police Department".

And in Los Angeles, one man is under arrest after a rifle was fired at a police vehicle on Sunday night, in what police described as an unprovoked attack. No-one was injured.