LAGOS, Sept 12 (Reuters) - Nigeria's central bank has barred lenders from paying dividends with earnings from one-off foreign exchange gains after several banks posted strong half-year earnings helped by a currency devaluation.

In a circular, the central bank said changes to the currency regime have impacted banks to varying degrees and that "banks are required to ... set aside the FCY revaluation gains as a counter-cyclical buffer to cushion any future adverse movements in the FX rate."

The central bank in June lifted restrictions on foreign exchange trading and allowed the currency to weaken by more than a third in reforms pursued by President Bola Tinubu to boost government revenue and revive economic growth.

Tinubu also scrapped a popular but costly fuel subsidy, in the country's boldest reforms in decades. Both reforms have saved billions of dollars but worsened a cost of living crisis.

Nigerian banks have posted one-off revaluation gains including First Bank, FCMB, Fidelity Bank , GT Bank and Zenith Bank.

"In this regard, banks shall not utilise such FX revaluation gains to pay dividend or meet operating expenses," the Central Bank of Nigeria said in the circular.

Top tier lenders GT Bank and Zenith Bank have each declared interim dividends of 0.50 naira respectively after posting strong half-year earnings, although it is not clear if they have used income from one-off foreign exchange gains.

The dividends have boosted sentiment on the stock market and helped last week to lift the exchange to more than a 20-year high. Banking stocks have risen 61% this year.

Banks' foreign-currency loans when converted back to naira on their balance sheets have ballooned as a result of the devaluation, causing some banks to breach both their lending limits and open positions on foreign exchange trading.

The central bank said it will grant a waiver to lenders that breached their lending and open position limits due to the currency devaluation. (Writing by Chijioke Ohuocha; Editing by Susan Fenton)