The mosque was built between 706 and 715