Luis Enrique announced he will stand down as Barcelona manager at the end of the season having watched his side go top of La Liga after thrashing hometown club Sporting Gijón 6-1 on Wednesday night.

On a dramatic evening in which Gareth Bale was sent off for Real Madrid as they scored two late goals to rescue a 3-3 draw against Las Palmas, Barça regained top spot from their bitter rivals as the manager who has won two league titles, two Copa del Reys and the 2015 Champions League since succeeding Gerardo Martino in 2014 confirmed he intends to leave in the summer when his contact expires.

Luis Enrique has been under pressure since the 4-0 thrashing at Paris Saint-Germain in the first leg of their Champions League last-16 tie last month, with Barcelona facing an uphill task to qualify for the last eight. Jorge Sampaoli of Sevilla is the early favourite to replace him, with Everton’s Ronald Koeman and Arsène Wenger of Arsenal having been linked with the post in the past.

Arsène Wenger not looking for new job after vacancy opens at Barcelona Read more

“I won’t be at Barcelona next season,” said Luis Enrique in his post-match press conference. “I need to rest. I would like to thank the club for the confidence they have shown in me. It’s been three unforgettable years. It’s a very difficult decision for me, one I’ve thought about a lot, but I think I need to be true to myself and fair to my way of thinking.

“In the pre-season I had a meeting with Albert Soler (Barça’s director of professional sports) and Robert Fernández (Barça’s technical secretary) where I mooted the possibility that I might not renew my contract. They told me there was no rush to take the decision. That moment has arrived. I’m announcing it. The reason is I live my work looking for solutions and it gives me little time to rest.

“I’d like to thank the club for the confidence they’ve shown in me over my time. They gave me the chance to coach the B team, I did that, and these three years have been unforgettable. I thank the club for all the support and professionalism and I’m not forgetting there are still three incredible months to go.”

Lionel Messi, Luis Suárez and Neymar each scored as Barcelona won their third successive league match since the surprisingly heavy defeat in Paris last month, while Cristiano Ronaldo scored twice in the final four minutes as Real failed to maintain their lead at the top. Bale was sent off for kicking and then pushing Jonathan Viera at 1-1 and they were trailing until Ronaldo scored with an 86th-minute penalty and an 89th-minute header, meaning Barcelona now hold a one-point advantage.

Their manager was criticised for his tactical approach against Unai Emery’s PSG side but insisted he was confident they could overturn the deficit next week, despite his shock announcement.

“I think we can turn it around and, if the stars are in our favour, we can go through,” he said. “Maximum effort and nothing more. The moment to say goodbye as the club deserves will come.”

Eibar's remarkable journey takes them to the edge of Europe | Sid Lowe Read more

Luis Enrique initially signed a two-year deal before agreeing a one-year extension at the end of a first season in which he won the treble. Barcelona’s president, Josep Maria Bartomeu, had spoken of his wish to keep the man who made more than 200 appearances for the club as a player between 1998 and 2004, but now he must look for a new manager.

“We accept Luis Enrique’s decision,” said Bartomeu. “He has been a great a coach. Now it is time to end his spell in the best possible way. Luis Enrique has brought us great success and he can still bring us more. The players are motivated to do it.”

Ivan Rakitic, the Croatia midfielder who scored Barcelona’s sixth goal three minutes from time in a resounding performance against Sporting, added: “First he told the team about his decision. We want to end the season successfully and enjoy what is left.”

Pep Guardiola, who left the Camp Nou in 2012 after four seasons in charge, admitted he was disappointed to hear of his former team-mate’s departure. “We are going to miss the perfect trainer for his personality, his character,” he said. “In his three years he played unbelievable football with unbelievable players.”