KARACHI - Pakistan's rupee gained 4.2% against the U.S. dollar on Wednesday's closing, central bank data showed, the largest single-day rise in years for a currency that has taken a battering in recent weeks on the back of an economic crisis.

The rupee closed at 228.80 to the dollar, up from 238.38 a day earlier, the central bank said, a day after the International Monetary Fund said Pakistan had cleared all prior actions needed to unlock much-needed bailout money.

(Reporting by Syed Raza Hasan; Writing by Gibran Peshimam; Editing by Andrew Heavens)