In Washington, nothing is surer to cause a good fight among friends than a juicy bit of pork. Witness what might be called The Nasty Tale of the Last Big UDAG Grant.

It is the kind of battle hardly anyone outside the back corridors of power ever hears about, but that occurs there almost every day, testing influence and will with millions of dollars at stake.

On one side was a political odd couple: Sen. Strom Thurmond (R-S.C.), one of the Senate's leading conservatives, and Charleston, S.C., Mayor Joseph P. Riley Jr., a liberal Democrat.

On the other side was Rep. Thomas F. Hartnett (R-S.C.), a boyhood pal of Riley and a conservative soulmate of Thurmond, who for one reason or another decided to make his stand against deficit spending and "rotten pork barrel politics" in his own back yard.

At issue was a $6.8 million Urban Development Action Grant (UDAG) from the Department of Housing and Urban Development, sought for an elaborate park and commercial development on Charleston's waterfront about a mile from Fort Sumter, where the first shots of the Civil War were fired in 1861.

The 12-acre project is a brainchild of Riley, who contends it would bring almost $44 million in private investment and 1,411 permanent jobs to his and Hartnett's hometown.

Hartnett fired the first shot of Charleston's latest civil war last August, announcing that he opposed the project. Riley, decrying Hartnett's position as "outrageous, unbelievable, ridiculous and unfortunate," said the congressman was waging "a political vendetta" against him because he had chaired the campaign of Hartnett's 1984 opponent. At one point, Hartnett reportedly told one of Riley's aides, "Tell Mayor Riley he can kiss future UDAG grants goodbye."

Normally, a congressman's opposition to a project in his own district is enough to kill it. But in this case Riley had a far more powerful ally to turn to -- Thurmond. After Charleston's UDAG application was denied last October, Riley, who had broken ranks with his party to endorse Thurmond's reelection in 1984, resubmitted it.

But when the list of the latest -- and in all likelihood the last -- round of UDAGs was sent to Congress Jan. 28, the Charleston project was missing. Of 55 grants on the list, all were smaller than Charleston's.

Thurmond went to work. "His approach is the money had been allocated and South Carolina should get its share," said Terry Hill, Thurmond's press secretary.

Within hours, Thurmond had talked to budget director James C. Miller III; HUD Secretary Samuel R. Pierce Jr.; Sen. Jake Garn (R-Utah) and Rep. Edward P. Boland (D-Mass.), chairmen of the appropriations subcommittees on HUD; and Rep. Silvio O. Conte (R-Mass.), ranking Republican on the Appropiations Committee, among others.

Exactly what was said during these conversations is unclear. Spokesmen for Thurmond and others directly involved are mum on the subject, though Hill observed, "Senator Thurmond is very good on the telephone." But within 24 hours of the calls, Charleston's waterfront park was in line to get $6.2 million from a HUD "discretionary" fund.

Hartnett asserted that Pierce, with the acquiescence of White House chief of staff Donald T. Regan, had "cut a political deal" with Thurmond so the senator could pay off a political debt to Riley (for his endorsement). Thurmond, through a spokesman, emphatically denied this.

Yet, the deal began to unravel. Hartnett, who is leaving Congress to run for lieutenant governor this year, apparently sabotaged it.

He said Pierce had agreed to approve the Charleston project if Thurmond could get Garn and Boland to agree with it. Hartnett said Boland agreed when Thurmond contacted him Jan. 28, but Garn didn't and "was very upset at Strom" for telephoning him when he was at Cape Canaveral to visit the families of the astronauts killed in the space shuttle explosion.

Thurmond, however, thought Garn had agreed to go along with the deal, Hartnett said. "So he called Pierce and told him, 'Send it the grant approval right up.' "

Meanwhile, Hartnett started a guerrilla operation, playing on the self-interest of other legislators. "The problem was there was only $25 million in Pierce's discretionary fund, and $21 million was already committed," said Hartnett. "Now, if Thurmond was going to get $6 million . . . someone had to lose. I found the names of the 21 districts getting money, and started calling their congressmen. I told them, 'I've got a story you might want to hear.'

"So all of them started calling Thurmond and Pierce," Hartnett said gleefully. "That's when the pot really started to boil."

Within days, the revived Charleston project was again dead.

Neither Thurmond nor Riley has given up, however.

"Senator Thurmond still fully supports the project," said Hill. "He doesn't know the meaning of the word back off."