Kyle Walker says he was "close" to joining Bayern Munich this summer but will now sign a contract extension at Manchester City.
The England full-back, 33, helped City become only the second English team to complete the Treble last season.
However, his future at Etihad Stadium appeared in doubt during pre-season amid strong interest from the German giants.
"Decisions can be made, things can turn," Walker said.
"It was close but in football things can happen. It wasn't meant to be.
"Would I have enjoyed the experience? Of course I would, but this is a great club and you can't underestimate what this club has done in the last six or seven years."
Walker fell out of favour with manager Pep Guardiola in spring and although he regained his place in the team, he was subsequently left out of the starting line-up for the Champions League final in June.
With his contract at City set to expire in 2024, Bayern offered him an attractive package to move before City later put forward what is understood to be a two-year extension to stay put.
"Why should I walk away if I am going to get enough game time that's right for me? That is all I want," Walker added.
"It was about who gave me the most years. It wasn't like I was going to a worse club because Bayern Munich is a massive club and seeing what Harry [Kane] is doing there and will do, it wasn't a step down.
"In the back of my head I always wanted to play for Manchester City but I had to do what was right for me and my future. It was just about which club gave me the years in my contract to play football at the highest level."
'Why would you want to leave?'
Walker, who joined City from Tottenham in 2017, says confirmation of the new deal with the reigning Premier League champions is imminent.
"The extension is coming," said Walker, who has five title-winner's medals. "It's my seventh season here and I feel like one of the old ones.
"I love the place. I've experienced things I only dreamt of here - especially the last season - so why would you want to leave a club like this?"
The speculation linking Walker with Bayern was at its most intense in July, just as City played the Bundesliga club during a pre-season friendly.
To some surprise at the time, Walker not only started for City but took the captain's armband.
"I am a Manchester City player. I am contracted to them so what do you want me to do? Turn round and say 'I am not playing because I want to force a move to Bayern Munich'," he added.
"That is not me as a person. I have a contract with the club and I will play for the club until the contract [ends] or they sell me - and I wasn't sold."
Walker is also keen to take on the City captaincy full-time, with Guardiola planning to hold a squad vote to identify Ilkay Gundogan's replacement in the coming weeks.
He continued: "The vote hasn't been yet. They like to do it after the transfer window is closed.
"It is an honour of privilege, of course I want it. If you can't pass on your knowledge and life experiences on or off the field, I shouldn't be playing at a great club like this."
Our coverage of Manchester City is bigger and better than ever before - here's everything you need to know to make sure you never miss a moment