BARCELONA — When Michael Phelps walked away from swimming after the London Olympics, he was adamant about one thing: His career was over.
Now, it sounds like he’s not so sure.
While saying he’s never been happier with his life — and certainly doesn’t miss the grind of what it took to become the winningest athlete in Olympic history — Phelps left the door open to change his mind before the 2016 Rio Games.
‘‘I don’t know what’s going to happen in the future,’’ Phelps said Monday. ‘‘I don’t know what’s going to happen tomorrow.’’
In Barcelona for the world swimming championships, Phelps was asked whether he’ll compete at the next Olympics, he coyly said he hasn’t planned that far ahead in his life.
That’s a striking change from his comments before and immediately after the London Games, when he insisted his retirement was set in stone and it had always been his goal to quit swimming before he turned 30. Phelps will be 31 when the Rio Games open.
‘‘I don’t know. We’re in 2013,’’ he said. ‘‘There’s nothing in the works right now.’’
There’s plenty of time for a comeback. Phelps would likely want to begin training before the end of the year, which would allow him to get into peak condition leading up to the next world championships in 2015, an important steppingstone for the Olympics.
Phelps certainly isn’t training at the moment. He jammed the small toe of his right foot on the edge of a sofa while at home in Baltimore, and aggravated the injury when he played in a golf tournament at Lake Tahoe.
He’s wearing a boot cast on his foot while in Barcelona to cope with a small stress fracture.
After some sightseeing and promotional appearances, Phelps took in a second night of swimming at the Palau Sant Jordi before getting ready to head back to the United States on Tuesday. He was accompanied by his new girlfriend, Golf Channel reporter Win McMurry.
‘‘I have no plans to do anything,’’ Phelps said. ‘‘I love what I’m doing now. I’m able to travel so much, play golf. I’m on my schedule. I’ve never been able to have that. I’ve never been able to do really whatever I want to do. I go wherever I want to go. I see whatever I want to see. It’s nice waking up at 10, 11, 12 o’clock in the afternoon. I’m pretty lazy besides playing golf. I don’t do much.’’
He once talked bravely about not setting any limits on how far he could go in golf, even joking that the only way he would be at the Rio Games was as a golfer.
He does have some projects away from the pool, including a series of swim schools and a foundation devoted to water safety. He said those are fulfilling projects, but he’s still trying to sort out where he wants to go in his life.
Phelps’s competitive side showed after the US men lost in the 400-meter freestyle relay on Sunday. The Americans were edged at the finish by the French, a repeat of last summer’s Olympics when a team that included Phelps also settled for silver.
‘‘We should never lose that relay with the talent we have on the team,’’ he said. ‘‘I was so fired up,’’ Phelps said. ‘‘We have enough guys on that team who can swim faster than that, and that was just frustrating for me to watch.’’
Not frustrating enough to announce his comeback.
Not yet anyway.