Olivier Giroud admits he came close to leaving Chelsea in January but is delighted to have signed a deal to stay with the Blues until the summer of 2021.
The former Arsenal striker's previous deal had been set to expire next month and he had been keen to get game time ahead of the European Championships.
"I was supposed to leave in the January transfer window because I wasn't playing much and I needed more game time to make the France squad for Euro 2020," World Cup winner Giroud told Chelsea's website.
"I very nearly left the club but I really think that God wanted me to stay at Chelsea. The manager told me that he couldn't let me leave because he didn't have anyone to replace me. Everyone knows what happened so I won't go back over it but the coach spoke to me privately and told me that he'd give more games.
"He kept his word and what then mattered to me was proving to him that he could count on me when I was called upon.
"I simply seized my opportunity and I repaid the faith that the manager had shown in me. That's why the club ultimately offered me the chance to continue my time at Chelsea and I accepted immediately because I like it here.
"I want to keep winning trophies and I want to continue to show the manager that he can count on me."