NIntegrate and MaxRecursion

I’m using NIntegrate to get the value of a very complicated function f[k,T,M], where T and M are some parameters:

S[T_, M_, MaxRec_]:= NIntegrate[f[k, T, M], {k,0,Infinity}, PrecisionGoal->10, MaxRecursion->MaxRec] 

What puzzles me is the fact that, for the same parameters, I get different values depending on MaxRec:

S[10^12, 10^12, 10] 

enter image description here enter image description here

1.30494*10^30 

versus

S[10^12, 10^12, 50] 

enter image description here

-1.161*10^45 

How should I interpret these results? I could provide the explicit form of f if needed. Thanks a lot!