Barcelona and Osasuna appealed against the decision to play the game on Thursday after it was initially postponed on March 8 following the death of a doctor at the Catalan club, but their pleas were ignored.
Barcelona were 4-2 down towards the end of the match before goals from Robert Lewandowski, Eric Garcia and Raphinha secured their comeback.
The 62-year-old Mazzarri became the second man to be sent packing this season by the ailing Italian champions.
Girona defeated their Catalan rivals for the first time ever in the top flight in a pulsating battle to rise two points above Real Madrid, second, after their 1-1 draw at Real Betis on Saturday.
Champions Barca were dominating the match early on under the scorching heat of south Madrid, with Brazil winger Raphinha the main threat to the home side's defence by running the right channel and creating several opportunities.
Barca's friendly against Juventus, due to be played later on Saturday, was cancelled after an outbreak of viral gastroenteritis among the Spanish team
Xavi's side wrapped up the title after two first-half goals from Robert Lewandowski spurred them to a 4-2 win against city rivals Espanyol on Sunday
UEFA opened a formal investigation into Barcelona last month for potential violation of the European soccer governing body's legal framework regarding payments made by the club to a company owned by a senior refereeing official
Barcelona beat Real Madrid 1-0 in the Copa del Rey semi-final first leg on Thursday at the Santiago Bernabeu, but were criticised for only having 34 percent possession
Real Madrid remain six points clear at the top of La Liga after Sergio Ramos's late leveller earned a 1-1 draw at Barcelona in El Clasico on a weekend in which none of the top six won.
Real Madrid captain Sergio Ramos rescued a draw and maintained the European champions' six-point lead at the top of La Liga in a 1-1 draw at Barcelona on Saturday.
Barcelona's Nou Camp is the biggest soccer arena in Europe and has long been the home of the world's best players but visitors have often complained that it is lacking in atmosphere.
Real Madrid can open a nine-point lead over bitter rivals Barcelona at the top of La Liga by winning Saturday's 'Clasico' at the Nou Camp.
Despite being former midfield heroes for the clubs they now manage, Barcelona coach Luis Enrique and his Real Madrid counterpart Zinedine Zidane are afforded little credit for their achievements in management.
Barcelona were held 1-1 by lowly Hercules in their King's Cup last 32 first-leg match on Wednesday while Mariano scored a hat-trick as Real Madrid romped to a 6-1 second-leg victory over third-tier Cultural Leonesa and a 13-2 aggregate triumph.
Saturday's blockbuster La Liga clash between Barcelona and Real Madrid will be preceded by a minute's silence for the 71 people killed in a plane crash that decimated the Brazilian football team Chapecoense.
Gerard Pique gives a scathing assessment of Barcelona's display after the champions were held to a 1-1 draw by Real Sociedad and casts doubt on his team's ability to retain the La Liga title unless their performances improve.
Barcelona's Brazilian star Neymar damaged his Ferrari Spider in a road accident but his club said he was ready to play against Real Sociedad on Sunday night.
Lionel Messi's prodigious talent is matched by his startling humility, which he displayed again on Thursday by denying that Barcelona's fate is determined by his presence in the team.