Brazil snatched a late leveller to share an entertaining and occasionally heated 3-3 friendly draw with Spain on Tuesday.