Polyuronates such as pectate and alginate are very well-known examples of biological polyelectrolytes undergoing, upon addition of divalent cations, an interchain association that acts as the junction of an eventually formed stable hydrogel. In the present paper, a thermodynamic model based on the counterion condensation theory has been developed to account for this cation-induced chain pairing of negatively charged polyelectrolytes. The strong interactions between cross-linking ions and uronate moieties in the specific binding site have been described in terms of chemical bonding, with complete charge annihilation between the two species. The chain-pairing process is depicted as progressively increasing with the concentration of cross-linking counterions and is thermodynamically defined by the fraction of each species. On these bases, the total Gibbs energy of the system has been expressed as the sum of the contributions of the Gibbs energy of the (single) chain stretches and of the (associated) dimers, weighted by their respective fractions 1 - theta and theta. In addition, the model assumes that the condensed divalent counterions exhibit an affinity free-energy for the chain, G(C)(aff,0), and the junction, G(D)(aff,0), respectively. Moreover, a specific Gibbs energy of chemical bonding, G(bond,0), has been introduced as the driving force for the formation of dimers. The model provides the mathematical formalism for calculating the fraction, theta, of chain dimers formed and the amount of ions condensed and bound onto the polyelectrolyte when two different types of counterions (of equal or different valence) are present. The effect of the parameter G(bond,0) has been investigated and, in particular, its difference from G(C,D)(aff,0) was found to be crucial in determining the distribution of the ions into territorial condensation and chemical bonding, respectively. Finally, the effect of the variation of the molar ratio between cross-linking ions and uronic groups in the specific binding sites, sigma0, was evaluated. In particular, a remarkable decrease in the amount of condensed counterions has been pointed out in the case of sigma0 = 1/3, with respect to the value of sigma0 = 1/4, characterizing the traditional "egg-box" structure, as a result of the drop of the charge density of the polyelectrolyte induced by complete charge annihilation.