We show that every matrix valued generalized Nevanlinna function can be rep
resented asa u-resolvent of a certain selfadjoint relation acting in a Pont
ryagin space. The negative index of this Pontryagin space may be larger tha
n the number of negative squares of the given function. The minimal index o
f negative squares which is needed to obtain such a representation is deter
mined. In the case of scalar functions, the results presented give rise to
some new classes of generalized Nevanlinna functions.