The sleepover sealed it.

Less than 24 hours after parting ways with longtime coach Jason Garrett, the Cowboys have reportedly found a replacement after agreeing to terms with former Packers coach Mike McCarthy, who stayed at owner Jerry Jones’ house Saturday night, according to ESPN’s Adam Schefter.

“Once you stay at Jerry’s house, he doesn’t lose his guy,” a source told Schefter.

After 13 years in Green Bay — which included a Super Bowl title, nine playoff appearances and a 125-77-2 record — McCarthy was interviewed by the Jets last offseason, but passed on the opportunity to meet with the Buccaneers and Cardinals, and sat out this season. McCarthy recently interviewed with the Giants, Panthers and Browns before Jones locked him up, and tasked the 56-year-old with ending a once-unthinkable quarter-century championship drought in Dallas. The Cowboys also interviewed longtime Bengals coach Marvin Lewis.

McCarthy holds a 7-3 lifetime record against the Cowboys, knocking them out of the playoffs in 2014 and 2016. His Packers Super Bowl win came at the Cowboys’ stadium.