President Hugo Chavez of Venezuela died Tuesday afternoon after a long battle with cancer, the government announced, leaving behind a bitterly divided nation in the grip of a political crisis that grew more acute as he languished for weeks, silent and out of sight in hospitals in Havana and Caracas.