Brazil's Neymar, Roberto Firmino and teammates celebrate with the trophy after the match Photograph:( Reuters )
The central defender rose at the near post to beat Argentina keeper Sergio Romero to a Neymar corner and head home the winner.
A stoppage-time goal from Miranda gave Brazil a 1-0 win over South American rivals Argentina in a foul-strewn friendly in Saudi Arabia on Tuesday.
The central defender rose at the near post to beat Argentina keeper Sergio Romero to a Neymar corner and head home the winner, deciding a game that was set to go to penalties to determine a winner.
"Scoring a goal against Argentina is always gratifying and always exciting," Miranda said.
Argentina are one of only two teams to have beaten Brazil since Tite took over as coach in 2016, but without Lionel Messi, who is taking a sabbatical from international football, they rarely troubled their neighbours in a derby match dubbed the Superclasico.
The game was played in the heat of the King Abdullah Sports City and the conditions contributed to a stop-start encounter that included 35 fouls, 21 of them awarded to Brazil.
Miranda should have put Brazil 1-0 up in the 28th minute when a Casemiro cross fell to him just metres from goal, but his scuffed shot was blocked on the line by Nicolas Otamendi.
Paulo Dybala went close with a swerving free kick for Argentina from just outside the box a minute later and Leandro Paredes watched a long-range effort drift just wide early in the second half.
Argentina improved considerably after the break, but Brazil still had the better chances, with Romero parrying away a fierce volley from Arthur after 70 minutes and Casemiro almost grabbing the winner with seven minutes left only to see his deflected free-kick curl wide.
"The team felt tired in the second half but I think we dominated our opponents, we played well and we got the goal at the end," said Brazil's Filipe Luis.
"Obviously our team is better than theirs, we have maintained the same squad for years and they are in the process of renewal, but you don't notice that so much in a clasico, what you do notice is their fight," the Atletico Madrid defender added. "But I think we deserved to win."
The defeat was the first in four games for Lionel Scaloni, the interim coach who replaced Jorge Sampaoli after the Russia World Cup.
It extends Brazil's run to four wins in four games since they were knocked out the World Cup in the quarter-finals by Belgium.