Armenia and Azerbaijan have agreed to stop fighting in the disputed territory of Nagorno-Karabakh following a deal brokered by Russia, which will send peacekeepers to the region to enforce the agreement.