Updated

The deadly shootings in Dallas, Minnesota and Louisiana this week were not far from President Barack Obama’s mind on his last day of his shortened trip to Spain.

The U.S. president, while speaking to reporters after a meeting with Spain’s acting prime minister Mariano Rajoy on Sunday, called for greater tolerance, respect and understanding from police officers toward the people they take an oath to protect. He also the protesters who attack police officers are doing a disservice to their cause.

"I'd like all sides to listen to each other," Obama said.

It was the fourth straight day that Obama has commented on a series of distressing events back home: the fatal shootings by police of black men in Louisiana and Minnesota, and a sniper attack that killed five police officers and wounded seven in Dallas.

He said violence against police by anyone concerned about fairness in the criminal justice system does "a disservice to the cause."

He repeated that the vast majority of U.S. police officers are doing a good job, but said rhetoric that fails to recognize that will do little to rally allies to support efforts to change a system that is broadly recognized as being biased against minorities.

"Maintaining a truthful and serious and respectful tone is going to help mobilize American society to bring about real change," Obama said.

The president also called for balance from law enforcement. "I would hope that police organizations are also respectful of the frustrations that people in these communities feel and not just dismiss these protests and these complaints as political correctness," he said.

"It is in the interest of police officers that their communities trust them," Obama said.

The president traveled to Spain after attending a NATO summit in Poland, but the shocking series of events at home late last week dominated most of his public appearances. Spain, nevertheless, appeared thrilled to welcome the first U.S. president to visit in more than a decade. Tourists and curiosity seekers lined some streets in hopes of catching a glimpse of him, and local TV aired wall-to-wall coverage of his movements.

Obama was supposed to spend two days in Spain, but cut the visit to about a day because of the shootings.

"We've had a difficult week in the United States," he told King Felipe VI before they met in private at the Royal Palace.

The king thanked Obama for visiting under the circumstances. The stop in Spain is the last leg of what is likely Obama's final trip to Europe before he leaves office in January.

The White House said the visit will highlight security cooperation between the trans-Atlantic allies, as well as political and economic ties.

After his meeting with Rajoy, Obama lauded the long-standing ties between the U.S. and Spain and complimented economic policies put in place under Rajoy's leadership, saying the changes have begun to "bear fruit." The economy is a top concern of the Spanish public, with nearly 5 million people out of work and the unemployment rate at about 20 percent.

Spain has been gripped by a political stalemate for months, with Rajoy unable to rally the political support he needs to form a new coalition government following a late-June election. It was the country's second round of inconclusive balloting in the past year.

Rajoy's party also won an election in December, but no other major party would help him form a government.

Rajoy thanked Obama for visiting and offered his condolences for the Dallas shooting. He touched on Spain's improving economic outlook and the political crisis, saying that having a third election in less than a year would be "a joke" that would damage the economy.

Obama also thanked Rajoy for his government's contributions as a fellow NATO ally, and for hosting U.S. sailors and guided missile destroyers at a naval base on the southern coast. A visit to the base, including an event with troops, was to be Obama's final stop before the flight to Washington.

Spain has been gripped by a political stalemate for months, with Rajoy unable to garner the necessary support to form a new coalition government following a late-June election. It was the country's second round of inconclusive balloting in the past year.

Rajoy's party also won an election in December, but no other major party was willing to help him form a government.

Obama addressed the political situation in an interview Saturday with the El Pais newspaper, saying he hopes Spain's next government will be just as committed to strong relations with the U.S. and Europe. He said the world needs Spain's contributions to the campaign against the Islamic State group, to counterterrorism efforts that prevent attacks and to its fellow NATO members.

"The relationship between Spaniards and Americans goes back centuries," he said. "We're connected by the ties of family and culture, including millions of Americans who celebrate their Hispanic heritage. Spain is a strong NATO ally, we're grateful for Spain's many decades of hosting U.S. forces, and we're major trading partners."

"That's why the United States is deeply committed to maintaining our relationship with a strong, unified Spain," Obama said.

He said he has longed to return to Spain ever since he passed through while backpacking across Europe decades ago, during his 20s, a point he underscored just before his private meeting with the king. He said he could not have imagined that he'd return years later and be greeted by royalty.

"I wish I was staying longer," Obama said Sunday. His wife, Michelle, and their daughters, Malia and Sasha, stopped in Spain in late June during the first lady's three-country trip to promote education for adolescent girls in developing countries.

Based on reporting by the Associated Press.

Like us on Facebook
Follow us on Twitter & Instagram