By Agence France-Presse
The leaders have spent two days in the central Chinese city of Wuhan for discussions on how to mend ties strained when troops from both sides came eyeball-to-eyeball in the disputed Doklam area.
The leaders "underscored the importance of maintaining peace and tranquility in all areas of the India-China border region," Indian's foreign ministry said in a statement following the meeting.
"They issued strategic guidance to their respective militaries to strengthen communication in order to build trust and mutual understanding and enhance predictability and effectiveness in the management of border affairs," it said, adding the two sides will "earnestly implement various confidence building measures."
New Delhi has also raised concerns about Beijing's Belt and Road initiative, a global trade infrastructure programme that includes a major project through Pakistan-administered Kashmir, disputed territory that New Delhi claims is illegally occupied.
The issue was not, however, mentioned in the Indian statement.
Instead, it emphasised that the two leaders had agreed to cooperate on a wide range of issues from economic development to counter-terrorism.
The leaders were scheduled to spend the morning strolling and boating around Wuhan's East Lake, before taking lunch.
They "exchanged views on bilateral relations, and international and regional issues of common concern Saturday morning in a relaxed, friendly atmosphere," China's state news service Xinhua said.
Friday's meeting included a museum tour, a meeting and dinner.
Both nations have previously said they are committed to solving long-standing border disagreements through dialogue, but progress has been glacial.
India and China went to war in 1962 over Arunachal Pradesh, with Chinese troops temporarily capturing part of the Himalayan territory.
The dispute remains unresolved: India considers Arunachal Pradesh one of its northeastern states, while China stakes claim to about 90,000 square kilometres (35,000 square miles) of the area.
In February, Beijing lodged an angry protest with New Delhi over a trip by Modi to the state.
Last year, Indian and Chinese troops faced off on the Doklam plateau, an area high in the Himalayas claimed both by China and by India's ally Bhutan.
The dispute began in June when Chinese troops started building a road on the plateau and India deployed troops to stop the project.
A crisis was averted in August when the two nuclear-armed nations pulled back.