Barack Obama on Tuesday warned against succumbing to "crude" nationalism in the aftermath of populist shocks in the Brexit referendum and the American vote, and with a wave of European elections looming.