(Adds context, reaction from a lawmaker)

MOSCOW, Aug 4 (Reuters) - Russian state oil producer Rosneft in April made a $1.015 billion advance payment to PDVSA, Venezuela’s state oil firm, under a crude oil purchase agreement with the company, Rosneft said in a quarterly financial report on Friday.

As Petróleos de Venezuela, S.A. faces a cash crunch and struggles to pay bondholders, it negotiated financial help from its Russian counterpart to complete its nearly $3 billion in debt payments in April, company sources told Reuters earlier this year.

Russia is a close political ally of Venezuela’s leaders. Rosneft Chief Executive Igor Sechin said in June his company, the world’s top listed oil firm by output, would continue to work in Venezuela and would never leave the country.

Rosneft had lent PDVSA $4 billion to $5 billion before the most recent agreement, according to Reuters calculations.

Venezuelan lawmakers have said that any debt transaction made without approval from the opposition-controlled Congress is considered unlawful.

“All these loans have been extended without the control that the Constitution requires. Hence, they are null,” said lawmaker Elias Matta, vice president of the congressional energy and oil commission.

A new legislative superbody proposed by President Nicolas Maduro was elected on Sunday in a controversial vote plagued by fraud accusations. The 545-member assembly is expected to hold its first session later on Friday.

In recent months, Russia and Venezuela have refinanced the outstanding debt by sending a larger supply of Venezuelan oil to repay the Rosneft loans. A “remediation agreement” since May has allowed the Russian firm to receive an extra supply of up to 105,000 bpd of Venezuelan heavy crude, while PDVSA’s U.S. unit Citgo Petroleum has imported less.

Rosneft also said in its financial report on Friday that in 2016 it made the equivalent of $1.485 billion in advanced payments to PDVSA.