The army chief said India wants peace along the borders but Pakistan was continuously violating the ceasefire, which caused loss of life and property.
"When such an action takes place, we also have to respond. We cannot sit idle. If there is ceasefire violation, then there will be action from our side," he said.
General Rawat said for peace, it was imperative that cross-border terrorism comes to an end.
"It is imperative to stop terrorism from across (the LoC), the camps which are there where training is given to them, from where the ammunition is infiltrated into Jammu and Kashmir and India, that should stop. If that happens, then I can assure you that peace will prevail on the borders," he added.
The Army chief said the suspension of anti-terrorism operations in Jammu and Kashmir was an attempt to make people realise the benefits of peace.
"The suspension of operations or what we call NICO (Non initiation of combat operations) has been done to make the people believe and see how the atmosphere is when there is peace. The way an atmosphere of peace and calm is here right now, in my opinion, the people here are very happy with that," he said.
The Union home ministry had announced on May 16 that security forces would not launch any operations in Jammu and Kashmir during the holy month of Ramzan. However, the security forces reserve the right to retaliate if attacked or if essential to protect the lives of innocent people.
"If this atmosphere of peace continues, then I assure you that we will think about continuing with NICO. But if there is some action by the terrorists, then we will have to rethink on this ceasefire or suspension of operations or NICO," he said.
General Rawat was in Pahalgam to launch Digital Education in five Army Goodwill Schools which has been established with the help of Power Grid Corporation and Extra Marks Foundation.
"Children in AGPS should get right kind of education. Their education standards should keep improving. Knowledge and education today needs infusion of technology. With this aim, we have taken help from PGC and Extra Marks foundation to start Digital education here," he said.
General Rawat said the Corporation has contributed nearly Rs 25 lakh and Extra Marks foundation is providing support.
"This will be started in five army goodwill schools on pilot basis. We would like to extend this technology to other army goodwill schools also. We want the children from here develop and progress in life," he added.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections. Election results will be out on May 23.