Indian equity indices ended with marginal gains with Nifty at 24730 on September 4.