Sanction has two nearly opposite meanings: to sanction can be to approve of something, but it can also mean to punish, or speak harshly to. Likewise, a sanction can be a punishment or approval. Very confusing––the person who invented this word should be publicly sanctioned!
See if you can guess the meaning of sanction in the following contexts. Before invading Iraq, the US and its allies first imposed sanctions on the country, refusing to supply the country with much-needed trade items. Did you guess sanction=punishment? You were right! But by trading with China at the same time, the US quietly sanctioned that nation's known instances of human rights abuses. Did you guess sanction=approval? You're right again!