Thomas Müller has signed a new contract with Bayern Munich to end any hopes Louis van Gaal retained of signing the forward for Manchester United this summer.

Last week the 24-year-old, who is with the German World Cup squad in Brazil, had alerted the Dutchman to his potential availability by saying he wanted to establish whether Bayern viewed him as an “essential component of the first XI” for next season, with Müller apparently unsure following Pep Guardiola’s first term in charge.

Van Gaal is an admirer of Müller after the new United manager handed him his Bayern debut in the 2009-10 season when previously in charge of the German champions.

Müller told the club website: “Shortly before the start of the World Cup, I’m very happy about extending my contract with FC Bayern until 2019. We held very good talks with the management of the club, which made it clear to me that I’m in the right place here.

“I have the feeling I’m an important component in the club’s plans. FC Bayern Munich has been my club since 2000 and will remain my club in the years to come.”

Philipp Lahm, the Bayern and Germany captain, has also re-signed. Lahm has committed his future to the club until June 2018.

“Both Philipp Lahm and Thomas Müller are very important members of the FC Bayern squad. Both have stayed loyal to the club since the start of their careers and will continue to play an important role here in the future. We’re delighted both players have committed to Bayern Munich for the long term,” said Bayern’s chairman Karl-Heinz Rummenigge.

“I now wish them a successful World Cup in Brazil and I’m keeping my fingers crossed for them and the Germany team as they seek to win the trophy.”

With United requiring at least one top-class central midfielder Van Gaal, who does not take charge at Old Trafford until after he has led Holland at the World Cup, may have to wait now until the tournament has ended to strengthen this area of his squad.

While the 62-year-old has identified the Barcelona wideman Alexis Sánchez and the Borussia Dortmund defender Mats Hummels as targets, Van Gaal has turned down the chance to sign Cesc Fábregas from the Catalan club to bolster central midfield.