Mexican Independence in 1821 necessitated direct rule from Spain . Under direct Spanish rule , banking , industry and education flourished more than it had in the previous two centuries . The opening of the Suez Canal in 1869 facilitated direct trade and communications with Spain .