After winning its independence from Spain in 1821, Guatemala briefly became part of Mexico and later a member of the United Provinces of Central America.