Ryan Giggs has resigned as Wales manager "with immediate effect".
The former Manchester United winger, 48, stepped away from his role in November 2020 after being arrested.
Giggs was later charged with using controlling behaviour and assaulting his ex-girlfriend, charges he has denied.
Robert Page took over as interim Wales boss in Giggs' absence, leading them to a first World Cup finals since 1958.
In a statement, Giggs said: "After much consideration, I am standing down from my position as manager of the Wales men's national team with immediate effect.
"It has been an honour and a privilege to manage my country, but it is only right that the Wales FA, the coaching staff and the players prepare for the tournament with certainty, clarification and without speculation around the position of their head coach."
The Football Association of Wales released its own statement following Giggs' announcement.
"The FAW places on record its gratitude to Ryan Giggs for his tenure as manager of the Cymru men's national team and appreciates the decision he has taken, which is in the best interests of Welsh football," it read.
"The full focus of the FAW and the Cymru men's national team is on the Fifa World Cup in Qatar later this year."
Former Wales captain Page, 47, Giggs' assistant since August 2019, took charge of matches from November 2020, leading Wales to top spot in their Nations League group.
He continued to deputise for Giggs - who was appointed by Wales in January 2018 - in March 2021 as Wales kicked off their 2022 World Cup qualifying campaign.
That would culminate in a famous play-off final win over Ukraine in June 2022, booking a place at Qatar for Wales' first appearance at a World Cup finals in 64 years.
Wales will play England, the United States and Iran in Group B, with their opening game against the USA on 21 November.
Under Page's guidance, Wales also reached the last 16 of the Euro 2020 finals, which were delayed until 2021 due to the Covid-19 pandemic, and he is now expected to become permanent Wales boss.
Giggs has pleaded not guilty to controlling and coercive behaviour against his ex-girlfriend Kate Greville between August 2017 and November 2020.
He has also pleaded not guilty to assaulting Ms Greville causing her actual bodily harm, and common assault of her younger sister, Emma Greville, at his home in Worsley, Greater Manchester, on 1 November 2020.
The trial was originally scheduled to take place last January but was postponed until 8 August due to a lack of court space. The trial is set to last a minimum of five days.
Giggs added: "I do not want the country's preparations for the World Cup to be affected, destabilised or jeopardised in any way by the continued interest around this case.
"I am sad that we cannot continue this journey together because I believe that this extraordinary group will make the country proud at our first World Cup since 1958.
"It is my intention to resume my managerial career at a later date."