Former FBI Director James Comey delivered his opening statement Thursday as he testifies before the Senate Intelligence Committee, addressing his interactions with President Donald Trump.

What follows is a transcription of his statement:

Thank you, Mr. Chairman. Ranking member Warner, members of the committee, thank you for inviting me here to testify today. I have submitted my statement for the record. I thought I'd just offer some brief introductory remarks. When I was appointed FBI director in 2013, I understood that I served at the pleasure of the president. Even though I was appointed to a 10-year term, which Congress created in order to underscore the importance of the FBI being outside of politics, an independent, I understood I could be fired by a president for any reason or for no reason at all. And on May the 9th, when I learned that I had been fired, for that reason I immediately came home as a private citizen. But then the explanations, the shifting explanations, confused me and increasingly concerned me.

They confused me because the president that I had had multiple conversations about my job both before and after he took office, and he had repeatedly told me I was doing a great job and he hoped I would stay, and I said I did intend to stay and serve out the remaining six years of my term. He told me repeatedly that he had talked to lots of people about me, including our current attorney general, and had learned that I was doing a great job and that I was extremely well-liked by the FBI workforce. So it confused me when I saw on television the president saying that he actually fired me because of the Russia investigation, and learned, again from the media, that he was telling privately other parties that my firing had relieved great pressure on the Russia investigation. I was also confused by the initial one offered because of the decisions had made during the election year that didn't make sense to me for a whole bunch of reasons, including the time and all the water that had gone under the bridge since the hard decisions that had to be made. That didn't make sense to me.

Although the law required no reason at all to fire the FBI director the administration then chose to defame me and more importantly the FBI by saying that the organization was in disarray, that it was poorly led, that the workforce had lost confidence in its leader. Those were lies, plain and simple. And I am so sorry that the FBI workforce had to hear them. And I'm so sorry that the American people were told them. I worked every day at the FBI to help make that great organization better. And I say help because I did nothing alone at the FBI. There are no indispensable people at the FBI. The organization's great strength is that its values and abilities run deep and wide. The FBI will be fine without me. The FBI's mission will be relentlessly pursued by its people and that mission is to protect the American people and uphold the Constitution of the United States.

I deeply miss being part of that mission, but this organization and its mission will go on long beyond me and long beyond any particular administration. I have a message before I close for the — for my former colleagues of the FBI. But first I want the American people to know this truth. The FBI is honest. The FBI is strong. And the FBI is and always will be independent. And now to my former colleagues, if I may. I'm so sorry that I didn't get the chance to say goodbye to you properly. It was the honor of my life to serve beside you, to be part of the FBI family, and I will miss it for the rest of my life. Thank you for standing watch, thank you for doing so much good for this country. Do that good as long as ever you can. Senators, I look forward to your questions.

Correction: This story was revised to correct the name of the committee where Comey testified. It's the Senate Intelligence Committee.