Guardiola has spent most of his playing career at Barcelona
Barcelona coach Pep Guardiola announced on Friday he is leaving the team at the end of the season, ending a four-year reign over one of the greatest eras in club football.
"This is not a very easy situation for me," the 41-year-old Guardiola told a news conference where the club also revealed that his assistant coach Tito Vilanova will take over.
"Four years is an eternity as coach of Barca," said Guardiola, who wore a grey V-knecked sweater and white collared shirt as he addressed a room in the Camp Nou filled with journalists and players.
"Time wears everything down, I feel drained and I need to replenish."
Guardiola apologised for leaving the club in uncertainty for such a long period while he considered whether to extend his one-year contract, which expires in June.
But the coach said he wanted to wait until the Champions League and the Liga title were settled before making an announcement.
Barcelona crashed out of Europe's premier club competition after a semi-final defeat to Chelsea on Tuesday, and Guardiola has already conceded the Spanish league title to arch rivals Real Madrid.
"The man who is succeeding me will be able to bring something more," he said, standing up to hug club president Sandro Rosell at the podium after his statement.
He added that he would coach again but not immediately.
"I cannot replenish if I coach again immediately, I don't want to," he said. "I am leaving at peace with myself, with the feeling of a job well done -- and I say that after losing two titles."
Guardiola thanked the players, some of whom including Gerard Pique, Cesc Fabregas and Xavi Hernandez were in the room, and said it had been a privilege to coach them.
Rosell heaped praise on Guardiola.
"Thank you Pep for having perfected a footballing model," he said.
"The gratitude of Barcelona supporters will be eternal to the greatest coach in the history of our club," he added.
"Let us be up to managing the legacy you leave us with, especially the remarkable playing system which will forever be remembered as the Pep system," Rosell said.
After spending most of his playing career at Barcelona, Guardiola coached Barcelona's B team before taking control of the first-team squad in June 2008 from Dutchman Frank Rijkaard.
In his four years at the helm, he has led Barcelona to 13 titles and is credited with promoting some of the most sublime football in the world, helped by huge talent including three-times FIFA Ballon d'Or winner Lionel Messi.
His successor Vilanova hit world headlines last summer when Jose Mourinho, coach of Real Madrid, poked him in the eye during a brawl on the sidelines of Barcelona's Supercup victory at the Nou Camp.
Asked about the incident, which earned him a two-match ban, Mourinho famously asked journalists at a post-match news conference: "Pito Vilanova? I don't know who this Pito is."
Vilanova, 42, played only briefly as a professional in Spain's top flight, notably with Celta Vigo, before turning to coaching at the end of his career and finding his way back to the club of his youth.
He came through Barcelona's youth ranks but after failing to break into the first team he continued his playing career with a number of lower league sides before retiring in 2002.
Vilanova rejoined the Catalans as a youth coach in 2007, helping Barcelona's B side to promotion.
He was promoted to first team duties, working alongside Guardiola, for the 2008-2009 season, by the end of which the team had won six major trophies including the Champions League.