We present a new heuristic approach for maximal constraint satisfaction of overconstrained problems (MAX-CSP). This approach is based on a formulation of CSP as an optimization problem presented in a previous paper [Meseguer and Larrosa, 95], which has given good results on some classes of solvable CSP. For MAX-CSP, we have developed two heuristics for dynamic variable and value ordering, called highest weight and lowest support respectively, to be used inside the extended forward checking algorithm (P-EFC3). These heuristics are expensive to compute, so we have developed an incremental updating formula to avoid redundant computation. We have tested both heuristics with the P-EFC3 algorithm on several instances of two classes of random CSP. Experimental results show that both heuristics outperform previously used heuristics based on inconsistency counts. In fact, the lowest support heuristic appears as a kind of generalization of these previous heuristics, including extra information a...