There has been a lot of talk recently about excluding Russians and Belarusians from sport. The general idea seems to be that the sporting bodies don't want to give the players a platform to speak. Lots of places are banning teams, but fewer are banning players. Excluding someone on the basis of what their country is doing is a pretty big step—one that I haven't seen in a long time. There are well-documented human rights abuses in a variety of countries, but these tend to be internal; it has been a while since one country has been so openly hostile to another.
These exclusions are, of course, fraught with difficulties over fairness, productivity and the like. This post isn't intending to discuss those—they are perhaps better suited to another SE, such as politics, anyway. Rather, it asks,
What examples are there in recent history where individuals and/or teams have been banned from competing on the basis of disapproval of their country's actions?
Certainly, a lot of exclusion of Russians and Belarusians is going on at the moment. I am interested in this historical context of these decisions, whether they have solid precedent or not.
It seems like there are a number of cases related to the exclusion of national teams—see the answers given below. I would be particularly interested if anyone has examples for individuals.
My main sport is tennis, so I had a look at Davis Cup—the team–tennis tournament. It seems that Yugoslavia was part of it in 1999 and Yugoslavians were playing tennis, pretty much as normal, throughout that year. This is the year in which Belgrade was bombed for ~7wks consistently by NATO. It's hard to get information on tennis over 20yrs ago, but it doesn't seem like players were excluded—but, as I say, it is hard to find information.
Wimbledon is (currently) banning Russian and Belarusian players—they can play on the world tour under a neutral flag and at French Open, but Wimbledon is forbidding their participation at all. Precedent for this decision was actually my main motivation for this question.