The 32-year-old was given a reprieve when he was just on a score of four runs, and the batsman went on to make the most of it as he scored 260 more runs to make the Sri Lankan bowlers toil on the field.
Iyer and Rahul put up a 59-run partnership, but immediately after reaching his half-century, Rahul (52) was sent back to the pavilion in the 13th over by Al-Amin Hossain, reducing India to 94/3.
The three-match series is currently levelled at 1-1. Bangladesh won the first match in Delhi while Rohit Sharma's knock of 85 runs guided India to an emphatic eight-wicket win in the second game.
Yuzvendra Chahal scalped two wickets for India and he was the key bowler as he put a hold on Bangladesh's run-rate.
In the final five overs, skipper Mahmudullah ensured Bangladesh does not lose momentum and he kept on playing big shots to keep his side's run-rate in check. He got out in the penultimate over, but Bangladesh ensured they post a score of more than 150 runs on the board.
The right-handed Sharma went managed to score just 9 runs in the first match of the series, however with this knock, he surpassed Virat Kohli to become the leading run-scorer in the shortest format of the game.
Indian cricket team captain, Virat Kohli was born on 5 November 1988 in Delhi into a Punjabi family. He is the son of Prem Kohli
In 2017, the Sri Lankan cricket team struggled with the dipping air quality levels and their players were seen with masks on during a Test match in Delhi.
The Indian team is set to play their first-ever day-night Test match against Bangladesh at Eden Gardens from November 22 to 26.
In pursuit of a yet another mammoth total in the first innings, Indian batsmen started slogging every ball and were reduced to 450/7 after 111 overs.