BRASÍLIA — Brazilian legislators voted on Sunday night to approve impeachment of Dilma Rousseff, the nation’s first female president, whose tenure has been buffeted by a dizzying corruption scandal, a shrinking economy and spreading disillusionment.

After three days of impassioned debate, the lower house of Congress, the Chamber of Deputies, voted to send the case against Ms. Rousseff to the Senate. Its 81 members will vote by a simple majority on whether to hold a trial on charges that the president illegally used money from state-owned banks to conceal a yawning budget deficit in an effort to bolster her re-election prospects. That vote is expected to take place next month.

Those pressing for impeachment had to win the support of two-thirds of the 513 deputies in the lower house; the decisive 342nd vote for impeachment happened at about 10:10 p.m. Eastern time. The final vote was 367 for impeachment, 137 against and 7 abstaining. Two deputies did not vote.

If the Senate accepts the case, Ms. Rousseff will step down temporarily while it deliberates her fate. Vice President Michel Temer, a constitutional law scholar and seasoned politician, will assume the presidency.