I think that mechanical engineering is the most broad of the engineering disciplines; it provides a great foundation for most any type of engineering work. I would think you could enter into petroleum engineering with a mechanical engineering degree, though you may have to do some supplemental coursework or even earn an advanced degree in that specialty. However, I should note that I am in the renewable energy field, and thus am not an expert in the petroleum field. I have my undergrad degree in math and a master's degree in mechanical engineering, and it was a perfect background for my field. Good luck!