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 controlled the entire country, even when Saladin failed to attack them in 1187.
( They ( ( ( ( controlled ( the ( entire country ) ) ) , ) ( even ( when ( Saladin ( failed ( to ( ( attack them ) ( in 1187 ) ) ) ) ) ) ) ) . ) )
(ROOT (S (NP (PRP They)) (VP (VBD controlled) (NP (DT the) (JJ entire) (NN country)) (, ,) (SBAR (RB even) (WHADVP (WRB when)) (S (NP (NNP Saladin)) (VP (VBD failed) (S (VP (TO to) (VP (VB attack) (NP (PRP them)) (PP (IN in) (NP (CD 1187)))))))))) (. .)))