The measure also gives pay raises in January to Vice President Al Gore, Cabinet secretaries and about 1,300 other top-level executive branch officials. By law, they get the same cost-of-living increases as members of Congress do.
The raises, plus a 4.8 percent increase in federal civil servants' salaries, were part of a $28 billion measure financing the Treasury Department and some smaller agencies for the fiscal year beginning Friday.
The 3.4 percent boost for members of Congress would raise most members' pay to $141,300 beginning in January.
Leaders earn more, topped by House Speaker Dennis Hastert, R-Ill., who will make $181,400. Gore will also earn $181,400, while Cabinet secretaries will make $157,000.
By law, federal judges would also be entitled to the same 3.4 percent increase, but Congress must approve that separately.
Lawmakers last gave themselves increases in 1998 and 1993. This year, the combination of a sturdy economy and a balanced federal budget led many members of Congress to conclude that the political climate for a pay raise was safe.
The presidential pay increase would be the first since the salary was doubled in 1969.
Opponents of the congressional and presidential pay increases have contrasted the salaries with what average Americans earn, and cite health insurance, travel and other perks received by elected officials.
Supporters say the salaries should be high enough to attract talented people who would otherwise enter more lucrative fields.