Indian benchmark indices ended with modest gains after a volatile session. At close, the Sensex rose 130.49 points, or 0.17 percent, to 77,185.43, while the Nifty gained 26.45 points, or 0.11 percent, to 24,078.50.