CARACAS, Venezuela — Venezuela announced Friday that it was devaluing its currency, a step that had long been deemed necessary but could push the spiking inflation even higher.

The devaluation, which lowered the currency’s value against the dollar by nearly a third, was aimed at solidifying government finances and easing a tight market for dollars that has choked back imports and led to shortages of basic goods.

The move had been widely anticipated, but it had been unclear whether officials would make what could be a politically risky decision with President Hugo Chávez still out of the country after undergoing cancer surgery in Cuba on Dec. 11.

If Mr. Chávez were to die or were too ill to continue as president, a special election would have to be called, and many analysts thought that the government might try to postpone a devaluation until after that occurred.