A gastroretentive, extended release composition which floats and swells at acidic pH prevalent in the stomach. The composition includes a pH dependent graft copolymer, a gellable polymer, a therapeutic agent, a gas generating system and pharmaceutically acceptable ingredients. The disclosed composition is useful to deliver the therapeutic agent within the stomach for an extended period of time.