Brendan Rodgers has agreed a deal to become the new Liverpool manager.
The 39-year-old will sign a three-year contract at Anfield and his appointment is likely to be officially confirmed within 24 hours.
Liverpool are negotiating a compensation package - expected to amount to between £4m and £5m - with Swansea to secure Rodgers' services.
Liverpool sacked former manager Kenny Dalglish on 16 May after finishing eighth in the Premier League.
In contrast, Northern Irishman Rodgers guided his Swansea side to an impressive first season in the top flight, including a 1-0 win over Liverpool on the final day of the season.
After parting ways with Dalglish, Liverpool embarked on an extensive search for a new manager.
Rodgers declined the opportunity to speak to Liverpool about the vacancy 12 days ago, and instead the club's hierarchy sought a meeting with Wigan's Martinez.
But it appears Rodgers was always the preferred candidate, despite Wigan chairman Dave Whelan at one point suggesting his manager had been offered the job at Anfield.
The proposed appointment of Louis Van Gaal as sporting director looked increasingly unlikely on Wednesday night with Rodgers demanding complete control of football matters.
Swansea released a statement from chairman Huw Jenkins on the club's website on Wednesday, which read: "I was contacted by Liverpool last night and they expressed their wish to speak to Brendan regarding their vacancy.
"I had a discussion with Brendan to talk about their interest and his views on whether he wanted to speak to Liverpool.
"He expressed his wish with me to do that and he has spoken to Liverpool today.
"Following on from discussions with Liverpool's owners, Brendan has informed us that he would like to take up their offer to manage Liverpool.
"At the moment we are currently in talks with the owners to agree compensation.
"We are trying to finalise that within the next 24 hours."
Rodgers' managerial career began at Watford in 2008 after coaching spells at Reading and Chelsea.
His return to Reading was an unhappy one but, after his appointment as Swansea boss in July 2010, Rodgers guided his Welsh side to promotion to the top flight in May 2011, making Swansea the first Welsh team to reach the Premier League.
Former England striker Gary Lineker, tweeted: "I feel this could be a very shrewd appointment. Totally gets the way the game's evolving."