Spain will host Brazil at Real Madrid's Bernabeu stadium in an international friendly on March 26 to raise awareness of racism.
Repeated racist abuse of Madrid forward Vinícius Júnior by opposing fans in Spain led to both international football federations working together to organise the game and reinforce their commitment against violence and racism under the theme "the same skin."
Brazil's Vinícius has been subjected to racist abuse since he came to play in Spain five years ago.
A match at the Mestalla between Real Madrid and Valencia last season was stopped during the second half after the Brazil international identified a fan in the crowd behind the Valencia goal as having racially abused him. In social media posts after that game, Vinícius said that "racism is normal in LaLiga" and said "in Brazil, Spain is known as a country of racists."
Brazil's Football Confederation (CGF) and the country's government urged Spanish authorities to act on racist attacks on Vinicius.
LaLiga has filed complaints to authorities for racist insults or chants against Vinícius, with some of them being shelved by prosecutors.
In October, LaLiga unveiled a system to monitor hate on social media as part of their fight against racism, with its president, Javier Tebas, admitting that one of his failings as was "not detecting earlier certain racism problems that Spanish football has."
The game between the sides will mark Spain's first game in 2024 and Brazil's second under new coach Dorival Junior.
Dorival was unveiled last week and will make his debut against England in an international friendly against England on March 23.
Spain last played against Brazil at the 2013 Confederations Cup and this would be the 10th time the two countries meet.