President Barack Obama urged Americans to stay true to the country's values today in a moving speech delivered at the Pentagon on the 15th anniversary of the 9/11 terrorist attacks on 11 September 2016.

Speaking from the Pentagon in Washington DC – the headquarters of the US military, which a group of al-Qaeda terrorists deliberately crashed a 747 plane into during the 9/11 attacks – the US president urged his citizens to stay true to America's ideals and remain a "beacon to the world".

In a moving speech, the president paid homage to the nearly 3,000 men, women and children who died in the attacks.

Obama also called on Americans to mark the occasion by believing in their country's principle: "Perhaps most of all we stay true to the spirit of this day by defending not only our country but also our ideals."

Read the full transcript of President Obama's speech below.

Full transcript of President Obama's speech

Scripture tells us, "Let not steadfast love and faithfulness forsake you… write them on the tablet of your heart."

Secretary Carter, Chairman Dunford, outstanding members of our armed forces, and most of all survivors of that September day and the families of those we lost.

It is a great honour once again to be with you on this day. A day that I know is still difficult, but which reveals the love and faithfulness in your hearts and in the heart of our nation.

We remember and we will never forget the nearly 3,000 beautiful lives taken from us so cruelly, including 184 men, women and children here, the youngest just three-years-old.

We honour the courage of those who put themselves in harm's way to save people they never knew.

We come together in prayer and in gratitude for the strength that has fortified us these 15 years, and we renew the love and faith that binds us together as one American family.

Fifteen years may seem like a long time, but for the families who lost a piece of their heart that day, I imagine it can seem like just yesterday.

Perhaps it's the memory of a last kiss given to a spouse or the last goodbye to a mother, father, sister or brother.

We wonder how their lives might have unfolded, how their dreams might have taken shape, and I am mindful that no words we offer or deeds we do can ever truly erase the pain of their absence.

And yet, you the survivors and families of 9/11, your steadfast love and faithfulness has been an inspiration to me and our entire country.

Even as you've mourned, you've summoned the strength to carry on. In the names of those you lost, you've started scholarships and volunteered in your communities and done your best to be a good neighbour, a good friend, a good citizen.

And in your grief and grace you've reminded us that together there's nothing we, as Americans, can't overcome.

The question before us, as always, is how to preserve the legacy of those we lost, how do we live up to their example and how do we keep their spirit alive in our own hearts.

Well, we've seen the answer in a generation of Americans.

Our men and women in uniform, diplomats, intelligence, homeland security and law enforcement professionals, all who have stepped forward to serve and who have risked and given their lives to keep us safe.

Thanks to their dedicated service, we have dealt extraordinary blows to al-Qaeda, we've delivered justice to Osama Bin Laden, we've strengthened our homeland security, we've prevented attacks, we've saved lives.

We resolve to continue to do everything in our power to protect this country that we love and today we once again pay tribute to these patriots, both military and civilian, who serve in our name, including those far away from home in Afghanistan and Iraq.

Perhaps most of all we stay true to the spirit of this day by defending not only our country but also our ideals.

Fifteen years into this fight the threat has evolved.

With our stronger defences, terrorists often attempt attacks on a smaller but still deadly scale.

Hateful ideologies urge people in their own country to commit unspeakable violence.

We've mourned the lost of innocence from Boston to San Bernardino to Orlando.

Groups like al-Qaeda, like Isil [Islamic State], know that they will never be able to defeat a nation as strong as America so instead they try to terrorize in the hopes they'll stoke enough fear that we'll turn on each other and we change who we are or how we live.

And that's why it is so important today that we reaffirm our character as a nation, people from every corner of the world, every color, every religion every background bound by a creed as old as our founding.

E pluribus unum – as many we are one – for we know that our diversity our patchwork heritage is not a weakness, it is still and always will be one of our greatest strengths.

This is the America that was attacked that September morning, this is the America that we must remain true to.

Across the country today, Americans are coming together in service and remembrance.

We run our fingers across the names on the memorial benches here at the Pentagon, we walk the hallowed grounds of a Pennsylvania field.

We look up at a gleaming tower that pierces a New York skyline, but in the end the most enduring memorial to those we lost is ensuring the America we continue to be, that we stay true to ourselves, we stay true to what's best in us, that we do not let others divide us.

As I mark this solemn day with you for the last time as president, I think of the Americans' stories I've been humbled to know these past eight years.

Americans who I believe embody the true spirit of 9/11.

It's the courage of Welles Crowther, just 24-years-old, in the South Tower, the man in the red bandana who spent his final moments helping others to safety before the towers fell.

It's the resilience of the firehouse on 8th avenue, patriots who lost more than a dozen men but who still suit up every day as the pride of midtown.

It's the love of a daughter, Payton Wall of New Jersey, whose father in his last moments on the phone from the towers told her: "I will always be watching over you."

It's the resolve of those Navy Seals who made sure justice was finally done who served as we must live as a nation getting each other's backs, looking out for each other, united, one mission, one team.

It's the ultimate sacrifice of men and women who rest for eternity not far from here in Green Hills in perfect formation. Americans who gave their lives in faraway places so we can be here today, strong and free and proud.

It's all of us, every American, who gets up each day, lives our lives, carries on, because as Americans we do not give in to fear. We will preserve our freedoms and our way of life that makes us a beacon to the world.

Let us not let steadfast love and faithfulness forsake you. Write that on the tablet of your heart.

And how we conduct ourselves as individuals and as a nation, we have the opportunity each and every day to live up to the sacrifice of those heroes that we lost, and God bless the memory of the loved ones here and across the country.

They remain in our hearts today.

May he watch over these faithful families and all who protect us, and may God forever bless the United States of America.

President Obama 9/11 anniversary speech 3
US President Barack Obama, Defense Secretary Ash Carter (unseen) and Joint Chiefs Chair General Joseph Dunford (right) take part in a ceremony marking the 15th anniversary of the 9/11 attacks at the Pentagon in Washington DC, 11 September 2016. Joshua Roberts/Reuters