Pakistan declared their second innings at 555 for three at lunch after Azhar and Babar Azam (100 not out) joined openers Abid Ali (174) and Shan Masood (135) in the run-fest.
He will be free to play for them from January 1 and could be involved in the FA Cup third-round tie at home to city rivals Everton on January 5.
Pace spearhead Mohammad Abbas had Karunaratne caught behind in the tenth over of the innings before 16-year-old paceman Naseem Shah had Mendis snapped up in the slips in the next over.
Brooklyn's Spencer Dinwiddie scored 39 points and the host Nets beat Atlanta 122-112, outscoring the Hawks 37-14 in the fourth quarter for the victory.
Pakistan thanked Sri Lanka on Monday for helping them bring Test cricket back to the country for the first time since the 2009 attack on the same visitors led to international matches being suspended.
"It was neither bad luck nor complacency," Zidane said after the game. "There's no reason to get depressed about this, we need to keep calm and keep our heads up."
Italian stadiums are the scene of recurrent racist incidents, including monkey cries aimed at black players.
Having won only three of their opening 12 league games, a run that led to the departure of Mauricio Pochettino, they have won four out of five under Mourinho to climb to fifth and have reached the last 16 of the Champions League.