The 1-year-old tot of ski racer Bode Miller did not get to see his dad snag his sixth Olympic medal in Sochi because of a nasty custody battle with the boy’s mother.

Miller’s attorney told a Manhattan Family Court judge on Monday that the baby’s mother, ex-Marine Sara McKenna, failed to get the necessary travel documents.

But McKenna’s attorney, William Beslow, countered that the downhill champ “changed his plans” after his client OK’d the international trip.

Judge Fiordaliza Rodriguez gave McKenna temporary custody of Samuel Bode Miller McKenna through April 13, ruling that it was important for the youngster to spend time with his 5-year-old half sister, Dace.

Rodriguez ruled in Miller’s favor even though McKenna’s attorney told the judge that her family would be visiting from California this month.

Miller, 36, has two children from different mothers and is married to a third woman — professional volleyball player Morgan Miller.

Beslow had argued that McKenna, 28, who had not seen her son from Feb. 23 to March 31, needed more time to bond with him.

“This child had gone five weeks without seeing his mother. There were adjustment issues. Her son looked at her as if to say, ‘Who exactly are you?’” Beslow told the judge.

“It just can’t be fair to the child to do something like that to him,” Beslow said.

The estranged couple is due back in court for a custody hearing on April 21.

Both parents are expected to testify if they cannot agree on a parenting plan.