BAGHDAD (Reuters) - Japan has agreed to lend Iraq up to $195 million for a project to help repair a thermal power station in the southern province of Basra, an Iraqi government statement said on Saturday.

Though Iraq is a major OPEC oil producer, the country faces chronic electricity shortages, with its fragile grid struggling to meet demand after years of war, sanctions and neglect.

The loan was signed during a visit to Iraq by Japan's State Minister for Foreign Affairs, Kentaro Sonoura, who met Prime Minister Haider al-Abadi on Saturday, the prime minister office said in a statement.

Iraq needs external financing to plug a budget deficit of approximately 25 trillion Iraqi dinars ($21.44 billion) for this year as it grapples with lower global oil prices and costs associated with the fight against Islamic State.