Over centuries of struggle , the defending Moorish army built a full-scale fort , or Alczar , on the heights of Madrid commanding the Manzanares valley .
The Moorish army built a fort to fend off the Italians .