President Barack Obama spoke while attending the return of the remains of U.S. Ambassador Chris Stevens and three other Americans killed in an attack on the U.S. Consulate in Benghazi, Libya. Below is a transcript of his remarks:

"Scripture teaches us greater love hath no man than this; that a man lay down his life for his friends. Glen Doherty never shied from adventure. He believed that in his life he could make a difference; a calling he fulfilled as a Navy SEAL.

He served with distinction in Iraq and worked in Afghanistan. And there in Benghazi as he tended to others, he laid down his life; loyal as always, protecting his friends. Today, Glen is home.

Tyrone Woods devoted 20 years of his life to

the SEALs, a consummate, quite professional. At the Salty Frog bar, they might not have known, but Rone also served in Iraq and Afghanistan.

And there in Benghazi he was far from Dorothy and Tyrone Jr., Hunter and little Kyle. And he laid down his life as we would have for them protecting his friends. Today, Rone is home.

Sean Smith, it seems, lived to serve; first in the Air Force, then with you at the State Department. He knew the perils of this calling from his time in Baghdad.

There in Benghazi, far from home, he surely thought of Heather and Samatha and Nathan. And he laid down his life in service to us all. Today, Sean is home.

Chris Stevens was everything America could want in an Ambassador as the whole country has come to see. How he first went to the region as a young man in the peace corps during the revolution; he arrived in Libya on that cargo ship.

He believed in Libya and its people and how they loved him back. There in Benghazi, he laid down his life for his friends; Libyan and American and for us all. Today, Chris is home.

Four Americans, four patriots. They loved this country. They chose to serve it, and served it well. They had a mission and they believed in it. They knew the danger and they accepted it.

They didn't simply embrace the American ideal, they lived it. They embodied it. Courage, the hope and yes the idealism that fundamental American belief that we can leave this world a little better than before.

That's who they were and that's who we are. If we want to truly honor their memory, that's who we must always be.

I know that that this awful loss, terrible images of recent days, pictures we're seeing again today, cause some to question this work. And there is no doubt these are difficult days.

In moments such as this so much anger, violence, even the most hopeful of us must wonder.

But amid all the images of this week, I also think of the Libyans who took to the streets with homemade signs expressing their gratitude to Americans who believed in what we could achieve together. I think of the man in Benghazi with a sign in English, a message he wanted all of us to hear. It said, Chris Stevens was a friend to all Libyans. Chris Steven was a friend. That's the message these four patriots sent.

That's the message that each of you sends every day. Civilians, military to people in every corner of the world. America is a friend. And we care not just about our own country, not just about our own interest, but about theirs. That even as voices of suspicion and mistrusts seek to divide countries and cultures from one another, the United States of America will never retreat from the world. We will never stop working for the dignity and freedom that every person deserves, whatever their creed, whatever their faith.

That's the essence of American leadership. That's the spirit that sets us apart from other nations. This was their work in Benghazi. And this is the work we will carry on.

To you, their families and colleagues, to all Americans know this; their sacrifice will never be forgotten. We will bring to justice those who took them from us. We will stand fast against the violence on our diplomatic missions. We will continue to do everything in power to protect Americans serving overseas. Whether means increasing security at our diplomatic posts, working with host countries on obligation to provide security and making it clear that justice will come to those who harm Americans.

Most of all, even in our grief, we will be resolute. But we are Americans and we hold our head high. Knowing that because of these patriots, because of you, this country that we love will always shine as alight onto the world.

"Greater love hath no man than this." The man laid down his life for his friends. The flag they served under now carries them home. May God bless the memories of these men who laid down their lives for us all. May God watch over your families and all who loved them. And may God bless these United States of America."

Watch the president's remarks: