WASHINGTON — In the end, white-hot political realities got the best of automatic budget cuts — at least when it came to military education.

Congress on Thursday reversed a so-called “sequestration” cut by the Pentagon, restoring most of a tuition-assistance program that provides up to $4,500 a year to active members of the military. The about-face followed a week of outrage and thousands of phone calls and complaints that inundated congressional offices.

But even while the move partially appeased one constituency, it only served to highlight the crisis-driven, piecemeal approach to budget legislating in Capitol Hill’s era of fiscal gridlock and partisan dysfunction.

The directive to the Pentagon to restore military tuition assistance was inserted into a temporary spending measure hastily passed this week, before Congress went on a two-week vacation, to prevent a government shutdown.

The temporary spending bill, or “continuing resolution,’’ cements the rest of the $85 billion in mandatory across-the-board cuts, which took effect automatically on March 1, for the rest of the fiscal year ending Sept. 30.

The sequester and the threat of a government shutdown stem from the same problem — the lack of a broader budget deal, due to the inability of Republicans and Democrats in Congress to perform the basic role of managing the nation’s purse strings.

US Representative Niki Tsongas, a Lowell Democrat who sits on the Armed Services Committee, said the promise of an education is a key incentive for the country’s all-volunteer military, and the suspension of tuition assistance would have been yet another “unacceptable consequence of the sequester.”

“You pull this away,” Tsongas said, “and it erodes the trust between the service members and the service itself.”

But Tsongas said she still voted against the short-term spending measure because it locked in the “irresponsible, reckless” cuts resulting from sequestration that hurt a number of her constituents — from the prison medical worker who has been furloughed to the manager of the Lawrence Municipal Airport whose air traffic control tower will close.

The elimination of tuition assistance would have hit around 300,000 members of the Army, Air Force, and Marines, including more than 1,300 in Massachusetts.

The cut sparked outrage in bases across the world and at some campuses in New England, with students, college administrators and advocates accusing the government of reneging on a longstanding pledge and abandoning the bargain it uses to entice military enlistees.

“We have a moral obligation to uphold our promises to these folks, and when you go back on this, it really feels like a betrayal,” said Paul Rieckhoff, executive director of Iraq and Afghanistan Veterans of America; his organization was in Washington this week lobbying Congress to restore the tuition program, among other issues. “Find somewhere else to cut. Cut the Easter egg roll. This is just stupid.”

That message penetrated Washington. A petition to the White House to restore the benefit reached 100,000 signatures this week, the threshold to warrant a public response.

The White House would not comment on the petition, but President Obama is expected to sign the continuing resolution in a matter of days.

The amendment ordering the Department of Defense to reinstate tuition assistance was turned back by the Senate on Monday, which triggered a flood of calls, according to Senate staff members. It was resurrected on the Senate floor on Wednesday afternoon and passed.

Senator Elizabeth Warren, a Massachusetts Democrat who supported the amendment, pointed out that military tuition aid is just one of many important programs on the chopping blocks.

“While I am pleased that we have stood up for military tuition assistance,’’ she said, “there are countless vital investments in our future — from medical research, to Head Start for our kids, to basic airport operations — threatened by mindless, across-the-board budget cuts.”

The automatic cuts hit the military particularly hard. The tuition assistance cuts could have saved the Army, Air Force and Marines close to $568 million, based on how much was spent last year. The Navy had not decided whether it would cut tuition assistance.

The new language requires that the Pentagon cut tuition assistance by no more than 9 percent, instead of eliminating it altogether, as it had planned. A Pentagon spokeswoman, Commander Leslie Hull-Ryde, said Thursday after Congress restored the program, “If enacted, this legislation would require the services to make difficult and very thoughtful decisions on how to fund tuition assistance throughout the remainder of fiscal 2013 without impacting readiness.”

The move by Congress will spare people like Chief Warrant Officer James Slater,
who had fixed humvees and machine guns in Iraq and now supervises an Army National Guard maintenance shop for military vehicles in Westfield. He is just eight months shy of earning a bachelor’s degree in organization management. He needs six more courses to finish his online program at Ashford University, a private for-profit school based in Iowa.

“I know that my competition all have degrees,” he said. At 56 years old, Slater is approaching retirement from the Army, and a degree could help him win a promotion, which would also boost his pension.

“I had kind of put my education on hold so I could put all my kids through college,” said Slater, a father of three grown children. “They were rooting for me after all this time and having the fortitude to go back to school.”

Keith Johnson, an Army career counselor in Londonderry, N.H., is majoring in human resource management at Southern New Hampshire University through a program that combines online courses and classroom instruction.

“A degree opens up options,” said Johnson, 37. Even if the tuition cut had remained in place, Johnson would have remained on track to graduate next February — but only because Southern New Hampshire, which enrolls more than 800 service members deployed around the world, said it was prepared to offer currently enrolled active-duty military students scholarships for the coming term, which begins in April.

“The idea that you would remove a tuition benefit from an actively deployed service person, given all we have asked of them, is astounding,” said Paul LeBlanc, the university’s president.

At Boston University, about 80 active-duty service members would have been hit by the cut, said Jay Halfond, former dean of the university’s Metropolitan College who oversaw its military programs. The students are stationed throughout the world, taking courses online as well as at Marine bases in North Carolina and Virginia, and at Hanscom Air Force Base in Bedford.

“Many joined the military with the expectation that their education would be covered,” Halfond said. “This was part of the good faith understanding they had in enlisting.”