En våbenhvile er efter flere dages forhandlinger blevet forhandlet på plads efter voldsom grænsestrid.