DALLAS (AP)  President Barack Obama joined with former President George W. Bush and others in memorializing five officers killed in the line of duty Thursday. Some of the highlights from the service:

Obama on despair: “We turn on the TV or surf the internet, and we can watch positions harden and lines drawn and people retreat to their respective corners, and politicians calculate how to grab attention or avoid the fallout. We see all this, and it’s hard not to think sometimes that the center won’t hold and that things might get worse. I understand. I understand how Americans are feeling. But Dallas, I’m here to say we must reject such despair. I’m here to insist that we are not as divided as we seem. And I know that because I know America. I know how far we’ve come against impossible odds.”

Obama on police: “We know that the overwhelming majority of police officers do an incredibly hard and dangerous job fairly and professional. They are deserving of our respect and not our scorn. When anyone, no matter how good their intentions may be, paints all police as biased, or bigoted, we undermine those officers that we depend on for our safety.”

Obama on bias: “Although most of us do our best to guard against it and teach our children better, none of us is entirely innocent. No institution is entirely immune, and that includes our police departments. We know this.”

Obama urging Americans to try and understand one another better: “I confess that sometimes I, too, experience doubt. I’ve been to too many of these things. I’ve seen too many families go through this. But then I am reminded of what the Lord tells Ezekiel. ‘I will give you a new heart,’ the Lord says, ‘and put a new spirit in you. I will remove from you your heart of stone, and give you a heart of flesh.’ That’s what we must pray for, each of us. A new heart, not a heart of stone, but a heart open to the fears and hopes and challenges of our fellow citizens.”

Bush on the escalation of disagreements: “Too often, we judge other groups by their worst examples, while judging ourselves by our best intentions. And this has strained our bonds of understanding and common purpose. But Americans, I think, have a great advantage. To renew our unity, we only need to remember our values. We have never been held together by blood or background. We are bound by things of the spirit, by shared commitments to common ideals.”

Bush comments to the families: Today, all of us feel a sense of loss, but not equally. I’d like to conclude with the word to the families, the spouses, and especially the children of the fallen. Your loved one’s time with you was too short. They did not get a chance to properly say goodbye. But they went where duty called. They defended us, even to the end. They finished well. We will not forget what they did for us.”

Dallas Mayor Mike Rawlings on mourning together: “While we did nothing wrong, there is a reason this happened here, this place, this time in American history. This is our chance to lead and build a new model for a community, for a city and for our country. To do that, there will be tough times ahead. We will mourn together, and together is the key word here.”