Help help help

While at Windrock for the spring jam, our rzr went down. We stopped at the bath house after the WWO race and when I went to start the rzr it died. The next attempt it backfired. It will stay running as long as you give it some gas but it sounds off. I had to put it in gear and give it gas to keep it running. The damn thing would throttle up then sputter over and over. Any ideas on what it could be.