Aug 22 (Reuters) - Indian shares ended with marginal gains on Tuesday, as markets remained range-bound with investors keeping to the sidelines due to a lack of triggers.

The benchmark BSE index closed up 0.11 percent at 31,291.85. The broader NSE index ended 0.11 percent higher at 9,765.55. Both the indexes recorded their first gain in three sessions.

Energy stocks were among the top gainers of the day, with Indian Oil Corp climbing 2.42 percent.

For midday report see (Reporting By Arnab Paul in Bengaluru; Editing by Amrutha Gayathri)