Avatar, just. They both have pros/cons over each other but Avatar overall was more consistent and had the better script.
I wouldn't put either anywhere near a top 100 of films though. They were well made and decent in narrative so I don't begrudge them (or Cameron) the big financial return, but they're miles off in terms of best script, acting, depth, etc.
Try to be reasonable... its easier than you think...