Battle of the Trench
Later in 627 he participated in the Battle of the Trench and also in the Battle of Banu Qurayza. In 628 Omar witnessed the Treaty of Hudaybiyyah.