Aberdeen have confirmed the appointment of Craig Brown as manager on a two-and-a-half year contract.
Brown, 70, has completed his switch from Motherwell along with assistant Archie Knox after they handed in their resignation at Fir Park late on Thursday night.
The pair will be officially unveiled on Monday, with caretaker bosses Neil Cooper and Neil Simpson remaining in charge for Saturday's Scottish Premier League clash against Hearts at Tynecastle.
Aberdeen chairman Stewart Milne said: "I don't think it's any secret Craig and Archie were our first choice and it's fantastic that they've agreed to come on board."
While the formalities of the deal were completed on Friday, agreement was reached in principle on Thursday before Brown and Knox stunned Motherwell with their resignations following a dramatic U-turn.
Motherwell have reported Aberdeen to the SPL over an alleged illegal approach but the Dons denied wrongdoing.
Milne said: "An agent contacted the club last week with regard to Craig and Archie and we indicated we would be keen to talk.
"Craig subsequently informed Motherwell that Aberdeen were interested in speaking to him and the Fir Park club raised no objection.
"Motherwell's subsequent statement on Wednesday referred to the fact there had been discussions between the parties without any suggestion of criticism of ourselves and it was therefore a surprise to us and Craig to learn of the accusations of inappropriate conduct."
Motherwell accused the Dons of a "gross discourtesy" and chairman John Boyle called for the Dons to delay the appointment until after the two teams meet at Pittodrie on December 18.
But that suggestion was not entertained by Aberdeen and Brown tried to defuse the tension between the clubs by claiming responsibility for the lack of contact.
Brown met Milne on Tuesday but soon categorically reaffirmed his allegiance to Motherwell, who also released a statement on Wednesday announcing their management team were staying.
But Brown publicly wavered later that day and admitted he would reconsider before resigning late Thursday night, when Aberdeen first made contact with the Lanarkshire club.
Brown told BBC Scotland: "I can be faulted there because the Aberdeen chairman said to me - we were having a relatively informal meeting - 'I better phone Mr Boyle'.
"I said, 'I don't think there's any need for that unless there's a likelihood of us continuing with you'. I dissuaded him from phoning Mr Boyle because, quite frankly, I didn't want us not to go there and Motherwell people to think we were touting for other jobs which we never, ever have done."
The SPL will not comment on the case with any disagreement between clubs likely to be dealt with in private. The fact that Brown and Knox were working without contracts, despite apparently agreeing 18-month deals in January, could work against Motherwell.
The SPL rules state that "no club shall either directly or indirectly induce or attempt to induce any manager, coach, trainer or other person involved in the training or management of the team of another club to break a written contract of employment".
Motherwell's surprise at Brown's decision was shared by many, not only because of his initial reluctance to leave his Ayrshire-based grandchildren and the bond with the Motherwell players and fans he spoke so enthusiastically about in midweek.
Brown has swapped the challenge of securing Motherwell's fourth successive season in Europe for an immediate fight at the foot of the table.
But he insists his age is no barrier to taking on a long-term project.
On Thursday, Brown spoke to Sir Alex Ferguson, who was assisted by Knox while leading the Dons to unprecedented success in the 1980s, and revealed the Manchester United manager's drive was a source of inspiration.
The former Scotland manager said: "Strange things happen in football. We spoke yesterday, Archie and I, to a man that's almost my age and he's managing the biggest club in Europe.
"Sir Alex was on the phone and he was joking with me, talking about my age and I said, 'Hey, you're 69 this month'.
"Now he's operating at a far higher level than we are and doing it hugely successfully. I think he's the marker.
"We'll never attain his success but we might have his longevity if we keep doing reasonably well."
Brown defended his dramatic U-turn, each episode of which was played out in public.
Brown had been lobbying Boyle to give him the financial backing to at least maintain the strength of his squad, and claimed Aberdeen offered more flexibility in the January transfer window.
The former Preston and Clyde boss said: "It's being a bit selfish but, when someone offers you a better job, I think it's understandable that we would be tempted.
"Impulsively, we said no because of the fantastic response from the staff, players and fans at Motherwell.
"But when asked to reconsider, we did. And I believe everyone has a right to change their mind.
"We just thought certainly, in the fullness of time anyway, potentially, Aberdeen's a better job, because the fan base is much bigger, it's a city club and it has a tradition which is exceptional.
"When a bigger job comes along and you think that you can do it, we were disposed to accept that offer."