(CNN) -- The following is a transcript of President Obama's Tuesday night speech to the nation about the official end of the U.S. combat role in Iraq:
Good evening. Tonight, I'd like to talk to you about the end of our combat mission in Iraq, the ongoing security challenges we face and the need to rebuild our nation here at home.
I know this historic moment comes at a time of great uncertainty for many Americans. We've now been through nearly a decade of war. We've endured a long and painful recession. And sometimes in the midst of these storms the future that we're trying to build for our nation -- a future of lasting peace and long-term prosperity -- may seem beyond our reach.
But this milestone should serve as a reminder to all Americans that the future is ours to shape if we move forward with confidence and commitment. It should also serve as a message to the world that the United States of America intends to sustain and strengthen our leadership in this young century.
From this desk, seven-and-a-half years ago, President Bush announced the beginning of military operations in Iraq. Much has changed since that night. A war to disarm a state became a fight against an insurgency. Terrorism and sectarian warfare threatened to tear Iraq apart. Thousands of Americans gave their lives; tens of thousands have been wounded. Our relations abroad were strained. Our unity at home was tested.
These are the rough waters encountered during the course of one of America's longest wars. Yet there has been one constant amidst these shifting tides: At every turn, America's men and women in uniform have served with courage and resolve.
As commander-in-chief, I am incredibly proud of their service. And like all Americans, I am awed by their sacrifice and by the sacrifices of their families.
The Americans who have served in Iraq completed every mission they were given. They defeated a regime that had terrorized its people. Together with Iraqis and coalition partners who made huge sacrifices of their own, our troops fought block by block to help Iraq seize the chance for a better future.
They shifted tactics to protect the Iraqi people, trained Iraqi security forces, and took out terrorist leaders. Because of our troops and civilians -- and because of the resilience of the Iraqi people -- Iraq has the opportunity to embrace a new destiny, even though many challenges remain.
So tonight I am announcing that the American combat mission in Iraq has ended. Operation Iraqi Freedom is over, and the Iraqi people now have lead responsibility for the security of their country.
This was my pledge to the American people as a candidate for this office. Last February, I announced a plan that would bring our combat brigades out of Iraq, while redoubling our efforts to strengthen Iraq's security forces and support its government and people. That's what we've done.
We've removed nearly 100,000 U.S. troops from Iraq. We've closed or transferred to the Iraqis hundreds of bases. And we have moved millions of pieces of equipment out of Iraq.
This completes a transition to Iraqi responsibility for their own security. U.S. troops pulled out of Iraq's cities last summer, and Iraqi forces have moved into the lead with considerable skill and commitment to their fellow citizens.
Even as Iraq continues to suffer terrorist attacks, security incidents have been near the lowest on record since the war began. And Iraqi forces have taken the fight to al Qaeda, removing much of its leadership in Iraqi-led operations.
This year also saw Iraq hold credible elections that drew a strong turnout. A caretaker administration is in place as Iraqis form a government based on the results of that election.
Tonight, I encourage Iraq's leaders to move forward with a sense of urgency to form an inclusive government that is just, representative, and accountable to the Iraqi people.
And when that government is in place, there should be no doubt: The Iraqi people will have a strong partner in the United States. Our combat mission is ending, but our commitment to Iraq's future is not.
Going forward, a transitional force of U.S. troops will remain in Iraq with a different mission: advising and assisting Iraq's security forces; supporting Iraqi troops in targeted counterterrorism missions; and protecting our civilians. Consistent with our agreement with the Iraqi government, all U.S. troops will leave by the end of next year.
As our military draws down, our dedicated civilians -- diplomats, aid workers, and advisers -- are moving into the lead to support Iraq as it strengthens its government, resolves political disputes, resettles those displaced by war and builds ties with the region and the world. That's a message that Vice President Biden is delivering to the Iraqi people through his visit there today.
This new approach reflects our long-term partnership with Iraq, one based upon mutual interests and mutual respect.
Of course, violence will not end with our combat mission. Extremists will continue to set off bombs, attack Iraqi civilians, and try to spark sectarian strife. But ultimately, these terrorists will fail to achieve their goals.
Iraqis are a proud people. They have rejected sectarian war, and they have no interest in endless destruction. They understand that, in the end, only Iraqis can resolve their differences and police their streets. Only Iraqis can build a democracy within their borders. What America can do -- and will do -- is provide support for the Iraqi people as both a friend and a partner.
Ending this war is not only in Iraq's interest; it's in our own. The United States has paid a huge price to put the future of Iraq in the hands of its people. We have sent our young men and women to make enormous sacrifices in Iraq and spent vast resources abroad at a time of tight budgets at home.
We've persevered because of a belief we share with the Iraqi people, a belief that, out of the ashes of war, a new beginning could be born in this cradle of civilization. Through this remarkable chapter in the history of the United States and Iraq, we have met our responsibilities. Now it's time to turn the page.
As we do, I'm mindful that the Iraq war has been a contentious issue at home. Here, too, it's time to turn the page. This afternoon, I spoke to former President George W. Bush. It's well-known that he and I disagreed about the war from its outset. Yet no one can doubt President Bush's support for our troops or his love of country and commitment to our security.
As I've said, there were patriots who supported this war and patriots who opposed it. And all of us are united in appreciation for our servicemen and women and our hopes for Iraqis' future.
The greatness of our democracy is grounded in our ability to move beyond our differences and to learn from our experience as we confront the many challenges ahead. And no challenge is more essential to our security than our fight against al Qaeda.
Americans across the political spectrum supported the use of force against those who attacked us on 9/11. Now, as we approach our 10th year of combat in Afghanistan, there are those who are understandably asking tough questions about our mission there. But we must never lose sight of what's at stake.
As we speak, al Qaeda continues to plot against us, and its leadership remains anchored in the border region of Afghanistan and Pakistan. We will disrupt, dismantle, and defeat al Qaeda, while preventing Afghanistan from again serving as a base for terrorists. And because of our drawdown in Iraq, we are now able to apply the resources necessary to go on offense. In fact, over the last 19 months, nearly a dozen al Qaeda leaders -- and hundreds of al Qaeda's extremist allies -- have been killed or captured around the world.
Within Afghanistan, I have ordered the deployment of additional troops who -- under the command of Gen. David Petraeus -- are fighting to break the Taliban's momentum. As with the surge in Iraq, these forces will be in place for a limited time to provide space for the Afghans to build their capacity and secure their own future. But, as was the case in Iraq, we cannot do for Afghans what they must ultimately do for themselves.
That's why we are training Afghan Security Forces and supporting a political resolution to Afghanistan's problems. And, next August, we will begin a transition to Afghan responsibility. [A White House spokesman confirmed after the president meant to say "July" in his speech and that the president misspoke when he said "August."]
The pace of our troop reductions will be determined by conditions on the ground, and our support for Afghanistan will endure. But make no mistake: this transition will begin -- because open-ended war serves neither our interests nor the Afghan people's. Indeed, one of the lessons of our effort in Iraq is that American influence around the world is not a function of military force alone. We must use all elements of our power -- including our diplomacy, our economic strength, and the power of America's example -- to secure our interests and stand by our allies. And we must project a vision of the future that is based not just on our fears, but also on our hopes, a vision that recognizes the real dangers that exist around the world, but also the limitless possibility of our time.
Today, old adversaries are at peace, and emerging democracies are potential partners. New markets for our goods stretch from Asia to the Americas. A new push for peace in the Middle East will begin here tomorrow. Billions of young people want to move beyond the shackles of poverty and conflict. As the leader of the free world, America will do more than just defeat on the battlefield those who offer hatred and destruction -- we will also lead among those who are willing to work together to expand freedom and opportunity for all people.
That effort must begin within our own borders. Throughout our history, America has been willing to bear the burden of promoting liberty and human dignity overseas, understanding its link to our own liberty and security. But we have also understood that our nation's strength and influence abroad must be firmly anchored in our prosperity at home. And the bedrock of that prosperity must be a growing middle class.
Unfortunately, over the last decade, we have not done what is necessary to shore up the foundation of our own prosperity. We have spent a trillion dollars at war, often financed by borrowing from overseas. This, in turn, has short-changed investments in our own people, and contributed to record deficits. For too long, we have put off tough decisions on everything from our manufacturing base to our energy policy to education reform. As a result, too many middle-class families find themselves working harder for less, while our nation's long-term competitiveness is put at risk.
And so at this moment, as we wind down the war in Iraq, we must tackle those challenges at home with as much energy, and grit, and sense of common purpose as our men and women in uniform who have served abroad. They have met every test that they faced. Now, it is our turn. Now, it is our responsibility to honor them by coming together, all of us, and working to secure the dream that so many generations have fought for -- the dream that a better life awaits anyone who is willing to work for it and reach for it.
Our most urgent task is to restore our economy, and put the millions of Americans who have lost their jobs back to work. To strengthen our middle class, we must give all our children the education they deserve, and all our workers the skills that they need to compete in a global economy.
We must jumpstart industries that create jobs, and end our dependence on foreign oil. We must unleash the innovation that allows new products to roll off our assembly lines, and nurture the ideas that spring from our entrepreneurs. This will be difficult. But in the days to come, it must be our central mission as a people, and my central responsibility as president.
Part of that responsibility is making sure that we honor our commitments to those who have served our country with such valor. As long as I am president, we will maintain the finest fighting force that the world has ever known, and do whatever it takes to serve our veterans as well as they have served us. This is a sacred trust.
That is why we have already made one of the largest increases in funding for veterans in decades. We are treating the signature wounds of today's wars, post-traumatic stress and traumatic brain injury, while providing the health care and benefits that all of our veterans have earned.
And we are funding a post-9/11 G.I. Bill that helps our veterans and their families pursue the dream of a college education. Just as the G.I. Bill helped those who fought World War II -- including my grandfather -- become the backbone of our middle class, so today's servicemen and women must have the chance to apply their gifts to expand the American economy. Because part of ending a war responsibly is standing by those who have fought it.
Two weeks ago, America's final combat brigade in Iraq -- the Army's Fourth Stryker Brigade -- journeyed home in the pre-dawn darkness. Thousands of soldiers and hundreds of vehicles made the trip from Baghdad, the last of them passing into Kuwait in the early morning hours. Over seven years before, American troops and coalition partners had fought their way across similar highways, but this time no shots were fired. It was just a convoy of brave Americans, making their way home.
Of course, the soldiers left much behind. Some were teenagers when the war began. Many have served multiple tours of duty, far from their families who bore a heroic burden of their own, enduring the absence of a husband's embrace or a mother's kiss.
Most painfully, since the war began 55 members of the Fourth Stryker Brigade made the ultimate sacrifice, part of over 4,400 Americans who have given their lives in Iraq.
As one staff sergeant said, "I know that to my brothers in arms who fought and died, this day would probably mean a lot."
Those Americans gave their lives for the values that have lived in the hearts of our people for over two centuries. Along with nearly 1.5 million Americans who have served in Iraq, they fought in a faraway place for people they never knew. They stared into the darkest of human creations -- war -- and helped the Iraqi people seek the light of peace.
In an age without surrender ceremonies, we must earn victory through the success of our partners and the strength of our own nation. Every American who serves joins an unbroken line of heroes that stretches from Lexington to Gettysburg; from Iwo Jima to Inchon; from Khe Sanh to Kandahar -- Americans who have fought to see that the lives of our children are better than our own.
Our troops are the steel in our ship of state. And though our nation may be traveling through rough waters, they give us confidence that our course is true, and that beyond the pre-dawn darkness, better days lie ahead.
Thank you. May God bless you. And may God bless the United States of America, and all who serve her.