Mencius said: “One who makes people submit by force does not win their hearts. They submit because their strength is not enough. When one makes people submit by virtue, they are pleased in their hearts and submit sincerely, as the seventy disciples submitted to Confucius.” (Mencius, Gongsun Chou I)
Just before this, he says that one who uses force under a show of benevolence becomes a hegemon, and one who practices benevolence through virtue becomes a true king. The idiom 以德服人, to win people over by virtue, goes back to this passage.