Almost three weeks after Mayor Jane Byrne jumped off the fence onto the Kennedy-for-President bandwagon, the remants of the old Daley machine are in the middle of a nasty, gossipy quarrel that has gotten the Kennedy campaign off to an embarrassing start in this crucial primary state.

To hear some Chicago Democrats tell it, the mayor's action is about the worst thing that ever happened to the local party.

"There's no question that the party is badly split," said one of the city's powerful ward committeemen. "People who never accepted Jane's victory are now taking sides in the presidential fight."

What's going on here is a series of feuds among political rivals that would make an Irish yarn rich enough to delight candidate Kennedy, if it weren't his campaign that is suffering because of it.

Democrats here are fighting over whether they should have endorsed Sen. Edward M. Kennedy so early, whether they should have endorsed him at all and whether Byrne or someone less threatening to Democrats outside the city should have supremacy in the statewide Kennedy organization.

All of this delights the Carter partisans, who admittedly are few in number in Chicago.

"At the time the mayor was expressing support for the president, there was very little movement toward Carter," said Robert G. Torricelli, Illinois director of the Carter-Mondale Committee.But things have moved very quickly since she endorsed Kennedy.

Torricelli said he now believes Carter has the jump on Kennedy in the Chicago suburbs and in the counties downstate, which together account for about 125 of the state's 179 delegates to the Democratic National Convention in August.

Kennedy organizers won't go that far, but they admit that Byrne's endorsement of the Massachusetts Democrat has caused some problems outside the city.

"Attendance at our meetings in the suburbs doubled or tripled after Byrne endorsed Kennedy," Torricelli said. "Carter was cast by the mayor as the nonorganization candidate, and others in the state have been glad to pick up on it."

But Carter isn't completely writing off the city either, counting on the fact that Byrne never has won the full support of the Daley organization. Carter's strategy in the city seems designed to widen the cracks that have appeared since the mayor endorsed Kennedy.

Local Democrats not clearly in Kennedy's camp are being courted furiously by the president. The guest list at last week's White House dinner for Ireland's prime Minister Jack Lynch included Daley's widow and one of her sons; former Illionois lieutenant governor Neil Hartigan, and Thomas Hynes, the Cook County assessor. On Monday, Hartigan broke with the party organization and endorsed Carter. Hynes, who urged the party 10 days ago to delay endorsing Keenedy, said Tuesday he hasn't decided whom to endorse.

The Carter camp is planning a series of endorsements this week from Illinois Democrats. Roland Burris, the Illinois comptroller, sided with Carter today. Also in the works in the expected endorsement of state Sen. Richard Newhouse, an independent black leader on Chicago's South Side.

Byrne is responding in typical fashion. "Whoop-de-do" she said when told about Hartigan. "He works for a bank [First National Bank of Chicago] and banks are making 15.5 percent on their prime [rate] right now, and that bank is tied to Carter." (The bank's chairman, A. Robert Abboud, was involved in one of the controversial loans to former budget director Bert Lance.)

And she continued to purge friends of her political enemies from the city payrolls. Last week she fired allies of county assessor Hynes and state Sen. Richard M. Daley, who also had urged the party to delay endorsing Kennedy. The mayor's office said there was no connection.

Byrne also has been busy protecting her flanks within the Kennedy campaign here. One of her political rivals, former assessor Thomas Tully, met for four hours Monday night with Stephen Smith, head of the national Kennedy committee, warning that Bryne's dominance would hurt Kennedy in downstate Illinois. Tully let it be known that he'd like to run the statewide campaign.

so far Smith has treated Byrne like royalty. "She'll call the shots," he said.

Democrats here ultimately expect the local party organization -- including the Daleys -- to fall in for Kennedy, but the overall fight in the state looks close. At a minimum, it is clear that the Kennedy camp did not reckon with the fallout that would accompany the endorsement by Byrne and the once-solid Chicago machine.