The word was out in the 39th Ward and the rest of the "city that works" last week: the "organization," the old Daley machine, was in trouble. The city had gone sour on the machine's mayor because he couldn't get the snow off the streets. And now it was up to the organization to save him.

"It's frightening," George Toft, a city hall aide said at a ward rally at Gompers Park Hall on the northwest side. "People are frustrated. They're taking it out on the mayor. That's why this is going to have to be a precinct captains' election."

Alderman Tony Laurino, the 39th Ward's boss or "Chinaman," as they are called here, was at the front of the hall with the wife of Mayor Michael Bilandic. Laurino was saying that Jane Byrne, who is challenging the mayor in tomorrow's Democratic primary, was an ingrate.

Byrne lived most of her life in a ritzy section of the ward called Sauganash, Laurino, who has spent most of his 69 years working his way up the organization ladder, told the party faithful. He claimed he got Byrne her first job at city hall.

"Of all our affairs, she's never showed up once. She never came to one of our meetings," he said. "She forgot the ward."

The message was not lost on the others in the audience. As they see it, politics is the art of favor-giving.

"As our late, great mayor, Richard Daley, used to say, nobody walks alone," Laurino said. "The door opens on one side and closes on the other."

That anyone in the Democratic organization should be worried about Byrne is startling. Until late December, the conventional political wisdom here was that Bilandic, who became mayor after Daley's death 25 months ago, would win reelection by the largest majority in history. His position in the organization was so secure that none of the better-known Democrats dared challenge him.

But a series of polls last week showed Byrne, Daley's former commissioner of consumer sales, running close to Bilandic. One poll, by party operatives, showed Byrne and the mayor running neck-and-neck. Another, by WBBM-TV, showed her leading Bilandic by 50 to 38 percent.

No serious analyst expects Byrne to upset the mayor. But she has made this the most intriguing mayoral race here since Daley was first elected in 1955.

What happened?

Snow. Seven feet of it.

The record snows made a sham out of the efficient-administrator image that Bilandic, a corporate lawyer, had cultivated. It took days for main thoroughfares to be cleared. Weeks went by before plows reached some side streets. Trains ran late. Buses never showed up in some areas. "The city that works, doesn't," declared Byrne, 43.

Matters worsened when it was disclosed that Bilandic, 56, had authorized $242,500 in no-bid, insider contracts -- including $90,000 for a snow-removal plan -- to former deputy mayor Ken Sain, a member of an influential political family in the 27th Ward. Sain's plan, a rehash of earlier studies, concluded that the best way to get rid of the snow was to shovel it up.

Bilandic compounded the situation. First, he insisted there was no problem. Then, when criticism mounted, he compared the attacks to the persecution of Christ by the Romans and the enslavement of blacks.

"It's our turn to be in the trenches to see if we are made of the same stuff as the early Christians, the persecuted Jews, the proud Poles, the blacks and Latinos," he told a party gathering.

It was not until last Thursday that Bilandic, who had suspended campaigning for a week to be with his ailing mother, Dominica Bilandic, 83, who died yesterday, reversed tactics. "We all learn from our mistakes," he told a pep rally of precinct captains. "I've made them, and I freely admit them."

By that time, however, the damage had been done. Bilandic had shown he was not a Daley handling the most severe crisis of his two-year-old administration.

"People are furious at Bilandic and they should be because it shows a decline in competence and integrity of city government," former alderman Leon Depres, a longtime machine critic, said. "In lowa, Michigan, Indiana, maybe even Washington, D.C., that would be enough to defeat someone, but not in Chicago." Byrne, he added, "will get a sentimental vote, far bigger than she or anyone else ever dreamed of, but she won't win."

The reason is that the machine lives, with or without Daley. It is a patronage army, with an estimated 25,000 patronage workers in the city. In addition, the machine has jobs at race tracks and in city bus and train systems and with public utilities.

"Their livelihood is at stake," said Milton Rakove a University of Illinois -Chicago professor. "They know if Jane Byrne is elected, their jobs are in jeopardy. They don't care about Bilandic as much as they care about themselves."

The machine survives on service and favors. Patronage is the glue that holds it together. It operates on a code of its own. The old-time precinct captain told Rakove how he started his political career almost 50 years ago in what was then called "the bloody 20th" Ward. When Rakove mentioned an alderman who several other people said had been killed in political warfare there, the old-timer said, "Yeah, there was some killin's. But not too many. Not enough to make an issue out of it."

In another interview, Rep. Abner Mikva (D-Ill.) told of his first visit to a ward headquarters in 1948. The conversation, as reported by the Chicago Tribune, went like this:

"Who sent you?" demanded a cigarchomping precinct captain.

"Nobody," Mikva said.

"We don't want nobody nobody sent. We ain't got no jobs anyway."

Mikva said he was not looking for a patronage job.

"We don't want nobldy that don't want a job. Where are you from?"

"University of Chicago."

"We don't want anybody from the University of Chicago in this organization."

The machine is largely decentralized with a power base in each of the city's 50 wards, Rakove argues. During Daley's more than two decades as mayor and party chairman, his role was more that of a skillful executive who accommodated the varying interests of the ward bosses, than that of a dictator. Thus, the machine survived his death in 1976 without missing hardly a beat.

As the only woman in Daley's cabinet and cochairman of the party, Byrne was a trusted part of the machine until Bilandic fired her in November 1977. She had accused him of illegally pushing through a taxi fare increase -- charges that led to state and federal grand jury investigations, which failed to turn up any wrongdoing. She now bitterly attacks the organization as corrupt and self-serving. "The machine could put Donald Duck in as mayor and they'd all march in and salute Mayor Donald and say what a great fellow he was," she said the other night.

But her commercials and leaflets play on her Daley connection.

She has only a skeleton organization and little support from labor or business, and is being outspent about 10 to 1.

"She has to bank on charisma," said one of her advisers, Don Rose. "She's waiting for magic to happen. And it just might. It's a crazy situation, almost as crazy as a peanut farmer from Georgia getting elected president."