They managed to control much of the country for nearly a century before the Muslim leader Saladin (Salah-ad-Din) defeated them in 1187.
( They ( ( managed ( to ( ( control ( much ( of ( ( the country ) ( for ( nearly ( a century ) ) ) ) ) ) ) ( before ( ( ( the ( Muslim ( leader Saladin ) ) ) ( -LRB- ( Salah-ad-Din -RRB- ) ) ) ( ( defeated them ) ( in 1187 ) ) ) ) ) ) ) . ) )
(ROOT (S (NP (PRP They)) (VP (VBD managed) (S (VP (TO to) (VP (VB control) (NP (NP (RB much)) (PP (IN of) (NP (NP (DT the) (NN country)) (PP (IN for) (NP (RB nearly) (DT a) (NN century)))))) (SBAR (IN before) (S (NP (NP (DT the) (JJ Muslim) (NN leader) (NN Saladin)) (PRN (-LRB- -LRB-) (NP (NNP Salah-ad-Din)) (-RRB- -RRB-))) (VP (VBD defeated) (NP (PRP them)) (PP (IN in) (NP (CD 1187)))))))))) (. .)))
They were defeated by Saladin, a Muslim leader, and lost control of the large part of the country they had. 
( ( They ( were ( defeated ( by ( ( ( ( ( Saladin , ) ( a ( Muslim leader ) ) ) , ) and ) ( ( lost control ) ( of ( ( the ( large part ) ) ( of ( the country ) ) ) ) ) ) ) ) ) ) ( they ( had . ) ) )
(ROOT (S (S (NP (PRP They)) (VP (VBD were) (VP (VBN defeated) (PP (IN by) (NP (NP (NNP Saladin)) (, ,) (NP (DT a) (JJ Muslim) (NN leader)) (, ,) (CC and) (NP (NP (VBN lost) (NN control)) (PP (IN of) (NP (NP (DT the) (JJ large) (NN part)) (PP (IN of) (NP (DT the) (NN country))))))))))) (NP (PRP they)) (VP (VBD had)) (. .)))