By Ayla Jean Yackley
ISTANBUL, Sept 24 (Reuters) - Ratings agency Moody's cut Turkey's sovereign credit rating to "junk," citing worries about the rule of law after an attempted coup and risks from a slowing economy, in a move that could deter billions of dollars of investment.
Turkey depends on investment flows to fund its current account deficit - one of the biggest in the G20 - and service its foreign debt. Ratings downgrades could force it to pay more to borrow money in international markets.
Prime Minister Binali Yildirim said the action, which came late on Friday, showed Moody's was not being impartial nor basing its rating solely on economic factors.
"We don't believe that these assessments are highly impartial. We believe they are attempting to create a certain perception of the Turkish economy," he told reporters.
The credit ratings agency cut the government's long-term issuer and senior unsecured bond ratings debt to non-investment grade Ba1 from Baa3. But it kept its outlook on the rating "stable," saying Turkey's flexible $720 billion economy and strong fiscal track record offset the balance-of-payments pressures it faces.
The lira eased to 2.966 in light trade from 2.954 late on Friday before the Moody's move.
The downgrade followed a two-notch cut to below investment grade by Standard and Poor's right after the attempted military coup in July.
Conservative investment funds usually require countries to have at least two investment grade ratings from major ratings agencies for them to invest.
Fitch Ratings is the only one left that has Turkey on investment grade, however, and it is due to review that rating at the start of 2017.
"The drivers of the downgrade are ... the increase in the risks related to the country's sizeable external funding requirements (and) the weakening in previously supportive credit fundamentals, particularly growth and institutional strength," Moody's said in an e-mailed statement.
"The government's response to the unsuccessful coup attempt raises further concerns regarding the predictability and effectiveness of government policy and the rule of law."
JP Morgan said in July that investors could sell $10 billion worth of Turkish sovereign and corporate bonds if its rating was cut to junk by one of the major ratings agency.
Turkey needs to attract $200 billion annually to finance its current account deficit and service its foreign-currency debt.
One way to attract investment would be for the central bank to raise interest rates, but on Thursday it instead cut its main rate again, setting aside concerns about inflation after repeated calls from President Tayyip Erdogan for cheaper credit. Moody's did not discuss the rate cuts in its statement.