2002 jeep liberty sport

my 2002 jeep liberty sport wont start up every single time i get gas it just cranks for like ten minutes and i eventualy just hold the gas while cranking till it turns over then i have to drive for 5 minutes without stoping or it will turn off. what could cause this?