WASHINGTON – President Obama signed into law the last piece of his mammoth plan to overhaul health care Tuesday and, with the same pen strokes, achieved a dramatic and far-reaching change in the way most Americas help pay the cost of a college education.

Both the health care provisions and revamping the loan program for college students were sandwiched into a single piece of legislation — the budget reconciliation bill approved last week by the House and Senate.

And, while the changes in the health care system are historic, the changes in the student loan program — though smaller — are just about as drastic. After years of controversy over a system in which the government and the private sector were major players, the new law ends the role of private banks as “middle men,” cuts program costs, and channels the extra money to the neediest students.

Overhauling the loan program, which fulfilled an Obama campaign promise, was a kind of stealth accomplishment for the president, coming as rider on the final piece of health care legislation.

The bill would shift responsibility for making cut-rate student loans to the government, ending the federal subsidies and guarantees now given to private banks that lend to students.

The overhaul was a defeat for the banking lobby, which has long succeeded in blocking efforts to cut out their lucrative role. Ironically, the health care debate has been replete with outsized warnings of a government takeover of health care, but the student loan overhaul marks an even more direct government move to supplant the private sector.

Rep. John Kline of Minnesota, ranking Republican on the House Education and Labor Committee, said the law amounted to “replacing a popular student loan model with yet another one-size-fits-all government bureaucracy” that would destroy 30,000 jobs in the private student loan industry.

Sen. Charles Grassley, R-Iowa, said that students would prefer getting such critical financing from a banker they know rather than from anonymous bureaucrats.

“I don’t see how the students of this country are going to get the same service out of four call centers as they get from their individual banks,” said Grassley.

Because studies show the government-operated program would be less costly , the overhaul would free up money to increase Pell Grants for low-income students and aid to black colleges.

Obama, speaking to a crowd of students at a community college in suburban Virginia before signing the legislation, said money that should have been spent advancing the educational interests of students “instead was spent padding student lenders’ profits.”