The premiers had decided the DGMOs should hold talks to reduce tensions but the meeting could not be scheduled till now, over which Singh had even expressed disappointment with Sharif.
Besides the DGMOs, a brigadier and three lieutenant colonels from both sides took part in the talks.
The Pakistani military released photos of Riaz receiving Bhatia at the border and a picture of the meeting.
A Pakistani military statement issued earlier said the decision to hold the meeting of the DGMOs was made at the political level.
Besides tensions on the Line of Control (LoC), the DGMOs were expected to discuss matters related to the international boundary with a focus on maintaining the 2003 ceasefire and ensuring normalcy, the statement said.