The woman returned to live in Scotland with her two sons, aged six and three, after fleeing her marital home in Rome earlier this year.
Her husband, an oil industry engineer who works in Iraq for six months of the year, brought a case at Scotland's highest civil court seeking an order for the children's return to Italy.
He claimed his wife had breached child abduction and custody laws by taking them to live in Scotland after the breakdown of their marriage without his consent.
However, Court of Session judge Lord Brailsford allowed them to remain after being shown a message which the father sent to the child's mother three months before their departure.
In the text, sent via messaging service WhatsApp, he said: "I don’t want to be your husband anymore, I don’t want you as my wife.
"You will keep the children as they need you even more than me. You just need to decide if you want to continue to live in Italy or if you want to go back to Scotland to live, then we can start the proceedings under the appropriate legislation."
The court heard the unnamed couple were married in Scotland in January, 2013, and moved to the husband's property in Rome.
However, their relationship was described as "volatile" and had broken down during the course of 2018.
The mother left Italy on January 19 this year following an argument with her husband which saw police called to their home.
She maintained that he had previously consented to the removal of the children from Scotland.
In his written ruling, Lord Brailsford said: "The text is again a clear expression of the petitioner’s view that he wished the marriage to terminate and, moreover and importantly, that he was content that the legal formalities of marital dissolution could be determined in the courts of Scotland, if that was the wish of the respondent.
"The text also appears to carry the implication of an acceptance that the respondent is the primary carer of the children (“you will keep the children as they need you even more than me”).
"This expression would, in my view, be consistent with permitting the respondent and the children to return to Scotland.
"Lastly, the text carries with it the plain implication that consent is ongoing shown by the fact that the author suggests that both parties and the children remain in Italy until Christmas (that is 2018) with legal proceedings in relation to dissolution of the marriage to follow thereon.
"On the basis of the foregoing I am satisfied that the return to Scotland on 19 January 2019, albeit the removal on that date was done covertly and without bringing it to the attention of the petitioner, is implement of consent."
The woman produced a further document, said to be a note written by her husband in September 2018, which gave her permission to take the children back to Scotland.
He claimed his signature had been forged on the letter.
However, Lord Brailsford said he preferred the evidence of a handwriting expert who said the signature had "probably" not been forged.
The judge said the note, along with the WhatsApp message, provided "clear" evidence of consent for the woman to return to Scotland.
The father, who has 'British Iraqi citizenship', challenged the court's decision but appeal judges refused to overturn it.
Lord Malcolm, sitting with Lord Drummond Young and Lord Carloway, said they saw "no reason" to disagree with the approach taken by Lord Brailsford in the case.