Four-day sit-in ends with deal