Ted Kennedy and Tom Harkin are among the Senate's liberals who can be counted on, with 10-strike force, to bowl over any Defense Department grab for money.

Or so it was thought. On June 26, the two voted to force the Pentagon to spend $56 million that even Caspar Weinberger has misgivings about. It would be more believable that a snow blizzard is covering south Texas in July than that Democrats Kennedy and Harkin voted to send the military on a spending spree that Weinberger opposed.

The vote occurred in late June on an amendment to a supplemental appropriations bill. It proposed awarding noncompetitive contracts to universities for military research and construction. Nine schools would divide the $56 million. Northeastern University, in Kennedy's Massachusetts, would receive $13.5 million to build what the senator, in a fit of eloquence, called ''a high-technology resource center'' but which everyone else calls a library. Iowa State University, enfolded by the green, green grass of Harkin's old home town of Ames, was in line for $6.5 million.

It used to be roads, bridges and dams that put politicians' hands deep into the pork barrel. Now there is university-military pork, to be sliced thick and awarded without competition or merit. It is seized by such liberals as Kennedy and Harkin, who are laryngitic one day in screaming against Pentagon extravagance but whisper "gimme, gimme" the next if the payload is for back home.

On a vote of 56 to 42, the Senate approved the nine contracts. Three weeks earlier, it had voted the other way, 58 to 40, and supported Sen. John Danforth's view that ''it is important to spend on muscle, not fat.'' Danforth (R-Mo.) sought to block the $56 million giveaway partly because he had heard from such groups as the American Association for the Advancement of Science and the National Academy of Sciences. Both organizations argued that Congress should not give academic research money without competitive or merit review.

This is where Weinberger comes in. He still wants to carry on his obsession with rearming America, which he first stated in 1981, but there are limits. Universities should at least compete for the money.

In floor debate, Danforth reported on the results of his own research project. Three of the nine universities ''never even had submitted proposals to the Department of Defense at the time that the Committee on Appropriations put the earmarking in for these proposals.'' Of the remaining number that had applied, ''the Department of Defense found that four of these earmarked universities did not have the research capability to do the job.'' In other words, seven of the nine were either uninterested or unfit.

In early June, the Senate embraced these arguments by voting 58 to 40 to deny the money to the schools. Closure, or something near to it, appeared to have been reached. In House action, only two projects -- including Northeastern University in library-loving Tip O'Neill's district -- were pork-barreled through.

Then the shadow games began. In a Senate-House conference committee, the compromise between the Senate's zero and the House's two became nine. Sen. Jeff Bingaman (D-N.M.), a Danforth ally in opposing the bill, called the 2+0=9 scheme a moment of ''numerical creativity.'' It was also lobbying creativity. In the three weeks between the first Senate vote and the second, which approved of the nine projects as they emerged from the conference committee, it was a political barnyard of horses being traded and pork cured. Sixteen senators changed their votes.

In addition, the mood was hurry-up. The vote, delayed until the last hours before the July 4 recess, put many senators in the position of choosing between the earmarking or not sending the entire bill to the president for signing.

In 1984, $1.2 billion in military contracts went to research at American universities. The immensity of that sum prompted Sen. Dennis DeConcini (D-Ariz.), who voted twice for the earmarking, to say, ''I feel like a real piker'' asking for a mere $25 million for a center at Arizona State.

Sen. Robert Dole (R-Kan.), pitching for $7 million for two schools in his state, argued geography: it's the large East and West Coast universities that have been disproportionately enriching themselves. Dole then asked for his cut.

Kennedy assured the Senate that the library at Northeastern -- a k a ''the high-technology resource center'' -- would provide construction jobs and thus help ''the economy of a poor community'' where the site is to be located.

So the $56 million isn't pork after all. The Senate voted for the little guy, for the heartland, for the poor. The only omission was for the snowplow operators trying to clear the 10-foot drifts on the Kennedy-Harkin Thruway in south Texas.