The research presented here is part of a larger research project named "Wetting in porous media, a multi method approach to measurement, imaging and modelling". The main focus in papers 1-4 has been to study mechanisms responsible for wettability alteration on reservoir minerals and then to study how surface wettability affects the distribution of immiscible fluids in porous media. Nuclear Magnetic Resonance (NMR) has been the main analytical tool. The thesis consists of two parts. Chapters 1-5 contains an introduction to the field, the theoretical concepts behind the research, the applied methods and materials, the main results and the conclusions drawn from this work. The second part contains the research papers that were published as a result of the work presented in this thesis. Papers 1-4 can be found after the bibliography. i I would like to acknowledge the excellent guidance provided by John Georg Seland. His teachings, his patience and in general his supervision has been second to none. I would also like to thank my co-supervisors Willy Nerdal and Per Fotland for their professional input when needed. When I started this project I had never operated an NMR spectrometer. I would therefore like to thank the rest of the NMR group at the Department of Chemistry as well (NilsÅge, Josè, Jarl, Olav and Christian) for including me and for advices along the way. I would like to give a special thank you to Christian for the way he taught me how to operate the spectrometers. The Department of Chemistry at the University of Bergen will always be a special place for me. Yes, it was the place i went to school for nearly a decade, but it was also the place where i met my fiancè. I was sitting in that office both when I was told that the bid on our first house was accepted and I was sitting there when Sarah Marie called to tell me that i had to come home because it was time to go to Haukeland to meet our son. My dearest Sarah Marie, the finishing touches on this thesis has been applied during weekends and during the late hours of the night, which I know has put extra responsibility on you. Thank you so much for your continued support and patience throughout this entire process. This would have been impossible without you. My dearest Eiliv, you are currently too young to realize that I have been working when I should have been with you. I promise that will change now. This is for you.