Ban, who begins a two-day official visit to Pakistan tomorrow, said his "offer of good office remains available" if both countries agree to his mediation.
"While I am saddened by the loss of lives in the course of all this conflict, I am relatively, reasonably encouraged by the recent move by both sides to engage in dialogue, to resolve their source of conflict through dialogue - that I will strongly welcome and support," he said.
Asked if he could help India and Pakistan reach a settlement, Ban said he could play a role only if both countries agreed on his mediation.
"My offer of good office remains available. If both sides think this is useful and both sides agree, then I'll be ready to offer my good offices," he said.
More From This Section
Ban said he would expect the Indian and Pakistani leadership to "continue their dialogue, to create some confidence-building measures".
Ban said tensions along the Loco were a "long-standing issue" and UN military observers had been "trying to prevent any conflict (across) the Lock".
"But you should know that UNZIP (UN Military Observers Group in India and Pakistan) is not mandated with any political role. So, these political issues should be handled and discussed by the leaders of both governments," he said.