0 . ▁ ▁Political ▁career ▁ ▁B anc ro ft ▁entered ▁politics ▁in ▁ 1 8 3 7 ▁when ▁appointed ▁by ▁Martin ▁Van ▁Bur en ▁as ▁Collect or ▁of ▁Custom s ▁of ▁the ▁Port ▁of ▁Boston . ▁Two ▁of ▁his ▁own ▁app o inte es ▁in ▁the ▁office ▁were ▁Or est es ▁Brown son ▁and ▁author ▁Nathan iel ▁Haw th or ne . ▁In ▁ 1 8 4 4 , ▁B anc ro ft ▁was ▁the ▁Democratic ▁candidate ▁for ▁governor ▁of ▁Massachusetts ▁but ▁he ▁was ▁defeated . ▁He ▁called ▁for ▁the ▁an nex ation ▁of ▁Texas ▁as ▁extending ▁" the ▁area ▁of ▁freedom " ▁and , ▁though ▁a ▁Dem ocrat , ▁opposed ▁sla very . ▁ ▁In ▁ 1 8 4 5 , ▁in ▁recognition ▁for ▁his ▁support ▁at ▁the ▁previous ▁Democratic ▁convention , ▁B anc ro ft ▁was ▁appointed ▁to ▁James ▁Pol k ' s ▁cabinet ▁as ▁Secretary ▁of ▁the ▁Navy , ▁serving ▁until ▁ 1 8 4 6 , ▁when , ▁for ▁a ▁month , ▁he ▁was ▁acting ▁Secretary ▁of ▁War . ▁ ▁During ▁his ▁short ▁period ▁in ▁the ▁cabinet , ▁B anc ro ft ▁established ▁the ▁United ▁States ▁Naval ▁Academy ▁at ▁Ann apolis , ▁creating ▁a ▁legacy ▁of ▁education ▁and ▁leadership . ▁He ▁ordered ▁naval ▁action ▁that ▁resulted ▁in ▁the ▁occupation ▁of ▁California ▁and , ▁as ▁secretary ▁of ▁War , ▁sent ▁Zach ary ▁Taylor ▁into ▁the ▁cont ested ▁land ▁between ▁Texas ▁and ▁Mexico . ▁That ▁catal yz ed ▁the ▁Mexican ▁War , ▁resulting ▁in ▁the ▁United ▁States ▁greatly ▁increasing ▁its