BRASILIA, Feb 23 (Reuters) - Brazil posted a current account deficit of $4.817 billion in January, up from a shortfall of $2.460 billion in December, central bank data showed on Tuesday.

The country was expected to post a current account deficit of $5.9 billion, according to the median forecast in a Reuters poll of 18 analysts.

In the 12 months through January, the deficit was equivalent to 2.94 percent of Brazil’s gross domestic product, down from 3.32 percent of GDP the previous month. Brazil attracted $5.455 billion in foreign direct investment last month, the central bank said. (Reporting by Alonso Soto and Marcela Ayres; Writing by Silvio Cascione)