The index finally (provisional) ended with a smart gain of 642 points at 13,991.The NSE Nifty moved up 175 points to settle at 4,164.