Olivier Giroud admitted he "very nearly" left Chelsea during the January transfer window before extending his contract with the Premier League club.
Giroud was linked with Serie A sides Inter and Lazio, but last month extended his deal through until the end of next season.
The 33-year-old striker said he was close to leaving Stamford Bridge before receiving assurances from head coach Frank Lampard.
"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," Giroud told the club'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."
Giroud arrived at Chelsea from Arsenal in 2018 and has already helped the club win the Europa League and FA Cup.
The France international is eager to win more silverware with Chelsea, while saying he was happy in London.
"I want to keep winning trophies and I want to continue to show the manager that he can count on me," Giroud said.
"Plus, with the whole coronavirus lockdown situation, I didn't really feel comfortable with the idea of moving abroad and uprooting my family. I think a lot about our quality of life and we have a great setup here. I think a lot about my family now."