Within five years after his defeat in the Battle of Uhud, however, Muhammad took control of Mecca and announced a general amnesty for all