BRASILIA (Reuters) - The Brazilian Senate on Wednesday approved a constitutional amendment to allow the government to use freely up to 30 percent of federal tax revenues that would otherwise be earmarked by law for other expenditures.

The budget measure, known as DRU, is key to help the government keep spending in check as it seeks to rein in its budget deficit this year and next.

The approval came quicker than expected, since senators agreed to vote the amendment in two rounds at the same session, a sign that the government of interim President Michel Temer continues to enjoy a comfortable majority in the house.

The measure had lapsed late last year and will now be extended until 2023. Previously, it had only affected up to 20 percent of federal tax revenues.

Temer has vowed to close a yawning fiscal deficit that cost Brazil its coveted investment-grade rating last year.

(Reporting by Maria Carolina Marcello and Alonso Soto; Writing by Marcelo Teixeira; Editing by Bernard Orr)