i can almost garantee that its a vaccuum line. same exact thing happened to me about a week ago. vaccuum hose from intake manifold to the fuel pressure regulator was leaking or broken. check your codes to see what you're throwing. i know (at least on the e34) you can check it by turning the car to on but not start it, then press the gas pedal 5 times within 5 seconds and it should then flash the codes in sequence. that's how i check mine.
here's a site explaining how