The aim of this investigation was to develop a novel in situ gelling formulation based on poloxamer-407 (PM) for the sustained release of an ophthalmic drug. In an attempt to reduce the concentration of PM without compromising the in situ gelling capability and also to increase the drug release time, xanthan gum (XG) and guar gum (GG) were added into PM to develop different formulations. At concentrations of 18% and above, the PM was able to undergo sol-gel transition below body temperature. It was found that XG and GG at a weight ratio of 3:7 were able to convert PM solution into gel below body temperature at PM concentrations below 18%. Both the in vitro and in vivo studies indicated that the PM with an XG-GG combination had a better ability to retain the drug than PM itself. The results indicated that the developed in situ gelling formulations containing PM with XG-GG may be a better alternative than a conventional eye drop. © 2013 Elsevier B.V.