In front of some of the players he molded into one of soccer's greatest teams, Barcelona coach Pep Guardiola said Friday he will leave at the end of the season and bring to a close a four-year reign of unprecedented success.

Guardiola said during a news conference at Camp Nou that the demands of the job were too great and his energy levels too low to continue. He will be replaced by his assistant, Tito Vilanova.

"Every day during four years, the demands are very high, the pressure, the necessary energy to push the players and enjoy it," said the 41-year-old Guardiola, a former Barcelona midfielder. "I need to rest and move away."

Already Barcelona's most successful manager, Guardiola can add a 14th trophy when his team plays the Copa del Rey final against Athletic Bilbao on May 25 in his last game.

His announcement came six days after a loss to Real Madrid that pretty much ended Barcelona's run of three straight Spanish league titles and three days after the Blaugrana were eliminated by Chelsea in the Champions League semifinals.

Guardiola said he made his decision in December but preferred to wait until the team's chase for major trophies was out of the way. He had extended his rolling one-year contract by February of the past two seasons but his decision not to do so this time led to ongoing speculation.

"I'm very sorry for all of the uncertainty I created over this time over my future. Maybe that was an error of mine," Guardiola said. "I didn't mean to create this kind of mood."

Guardiola's news conference was attended by Carles Puyol, Xavi Hernandez, Victor Valdes, Cesc Fabregas, Sergio Busquets and Pedro Rodriguez. Three-time world player of the year Lionel Messi, the player Guardiola built his team around, was absent.

"Leo is with us now," Guardiola said. "All the players are here with me. I don't remember any single title, rather the emotion I shared with my players. You do everything for the trophy, but you take away the feeling."

Messi later said he was too moved by the moment to attend the news conference of the coach that had helped him become the club's career scoring leader.

"I want to thank Pep with all my heart for everything he has given me personally and professionally," Messi wrote on his Facebook page. "Due to the emotion I am feeling, I preferred not to be present at Pep's press conference and instead far from the media, above all because I know that they would look for the player's faces and that is something I decided not to show."

Guardiola has led Barcelona to 13 trophies since replacing Frank Rijkaard at the beginning of the 2008-09 season, surpassing Dutch great Johan Cruyff as the European powerhouse's most successful coach in its 113-year history.

Under the former Spanish national team player, Barcelona doubled its number of Champions League trophies with wins in 2009 and 2011, claimed three straight Spanish league titles, won two Club World Cups, two European Super Cups, three Spanish Super Cups and one Copa del Rey. His record is 175-21-46, with a 618-178 goal difference.

"He should be very proud of his career with his club," Spain coach Vicente del Bosque told The Associated Press. "No one will ever match what he has done. Especially when you consider the level of what he has achieved, the image he has shown, his behavior — I'm sure it was the best decision for him and for Barca."

Guardiola's rivalry with Madrid coach Jose Mourinho has also been one of the most engaging La Liga story lines since the Portuguese coach's arrival at Madrid in 2010. Their once seemingly normal relationship as former Barcelona colleagues descended into acrimony with each of the 11 "clasicos" played between the teams during the past two seasons.

Vilanova has been Guardiola's assistant since the pair took over Barca B in 2007-08, earning the team promotion to the second division.

"I think the club is right (on Tito). He is more than qualified, and the players know him. He will change very little of what we do, and he will give a lot to the players and club," Guardiola said. "I can't fool myself that I have the same energy as before."

The 42-year-old Vilanova, a Barcelona youth player who never played for senior club, missed several weeks last fall following surgery on a salivary gland.

"Why Tito?" Barcelona sport director Andoni Zubizarreta said. "Because he represents the game, the analysis, the preparation. He puts the extra hour into preparation. He has the capacity and the personality to be here because we know him. So we decided to look inside our house and it was easy."

Guardiola did not reveal his plans for the future except for saying he would like to return to coaching again sooner rather than later.

Specifically, Guardiola denied having had contact with Chelsea.

"No. It would be disrespectful to the club. I haven't met with anyone," he said. "Now I need to rest and look at it from outside. Life will take me where it wants to go."


AP Sports Writer Paul Logothetis contributed to this report from Madrid.