Responding to a question at a press meet, Mr Gokhale said Prime Minister Modi had telephoned Prime Minister Oli, who was sworn to the post on February 15, to congratulate him and the visits were discussed then.
"When Prime Minister Modi had telephoned Prime Minister Oli upon his election as the prime minister of Nepal, they had discussed the visit then. Prime Minister Oli had then expressed his desire for an early visit by Prime Minister Modi. They had discussed the visits, and the Prime Minister (Modi) had said you (Oli) come first.
"So that's how the sequence has been, first Prime Minister Oli visited India and now Prime Minister (Modi) is in Nepal," Mr Gokhale said.
Mr Oli had arrived in Delhi on April 7, when he said the "historical" and "renewed" friendship between India and Nepal was oriented towards the future and the bilateral ties have evolved according to the "needs of times".
On questions over the timing of the visit which coincides with the high-stake Karnataka assembly election, he said, "whenever state visits take place they are decided as per the convenience of the two nations. No one prime minister alone can say that I will come at this time."
PM Modi arrived in Kathmandu yesterday on a two-day visit and held discussions with Mr Oli on strengthening ties between the two neighbouring countries.
He also met Nepal's former prime ministers Prachanda and Sher Bahadur Deuba, and opposition leaders and held wide-ranging discussions on ways to strengthen bilateral ties.
During the visit, the prime minister also offered prayers at the famed 20th century Janaki temple, the Mukhtinath and Pashupatinath temples and attended a civic reception at Janakpur.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.