Volkswagen has reached an agreement with banks on the terms of a planned €20 billion bridge loan to help it shoulder the costs of its emissions scandal, three people familiar with the matter said.

Europe’s largest automaker is under pressure to shore up its finances as it faces multibillion-euro costs of regulatory fines, lawsuits and refits of about 11 million diesel vehicles.

Thirteen banks are offering credit portions of either €1.5 billion or €2.5 billion each, or a total of €29 billion, two of the people said, declining to be named because the matter is confidential.

One of the people said credit portions would be assigned to banks on Friday. Another person said that would happen in the coming days, without being more specific. A spokesman for Wolfsburg, Germany-based VW has declined to comment.

Volkswagen has set aside €6.7 billion for the initial costs of the diesel emissions scandal and has said it expects additional expenses of at least €2 billion for falsifying certification of carbon dioxide (CO2) emissions.

Analysts have said securing funding from banks in the wake of the scandals, which have wiped billions off the group’s market value, would help signal investors that the VW remains a robust borrower.

Standard & Poor’s on Tuesday downgraded VW’s credit rating to ‘BBB+’ from ‘A-’, the latest demotion of the carmaker’s credit worthiness following similar moves by peers Fitch and Moody’s.