PM Modi made these remarks during his bilateral meeting with Russian President Vladimir Putin on the margins of the SCO summit in September this year.
On Wednesday, the G20's Bali Declaration acknowledged differences among members on the Russia-Ukraine war. It also stressed that it was essential to adhere to international law, including the protection of civilians caught in conflicts, according to the news agency PTI.
The G20 members made it clear that they were against the threat of nuclear weapons use and sought 'peaceful resolution of conflicts'.
In a press briefing, White House Press Secretary Karine Jean-Pierre said, "India played an essential role in negotiating the summit's declaration. Prime Minister Modi made clear today's era must not be of war."
"Among other priorities addressed, we have a path forward to addressing current food and energy security challenges while continuing our efforts to build a resilient global economy," she added, as quoted by PTI.
India takes over the G20 Presidency in December this year, which all its members and international community say would be an important milestone in the history of the grouping.
"Prime Minister Modi's relationship was critical to this outcome, and we look forward to supporting India's G20 presidency next year. We look forward to that next meeting," Jean-Pierre said.
She also informed that US President Joe Biden spoke with PM Modi and Indonesian President Joko Widodo on the sidelines of the summit.
The Group of 20 or G20 members include Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, South Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, the UK, the US, and the European Union.
(With PTI inputs)