Wigan Athletic have confirmed that Malky Mackay has been appointed the club's new manager.
The 42-year-old had been out of work since leaving Cardiff City in controversial circumstances in December 2013.
Following his departure from Cardiff, it was revealed that Mackay had sent a series of offensive texts to a former colleague.
The Scot is currently the subject of an ongoing Football Association investigation into the matter.
Championship outfit Wigan had been looking for a new boss after sacking Uwe Rosler last week.
The Latics are currently in the relegation zone following just one win in their last 12 games - a run of results that ultimately cost Rosler his job.
Mackay will take charge of Wigan for the first time on Saturday when they welcome promotion-chasing Middlesbrough to the DW Stadium.