Chicago's political patronage system, the oil that has kept the Democratic machine running smoothly for two generations here, was ruled unconstitutional in a federal court today.

In striking down the political "spoils" system, U.S. District Court Judge Nicholas J. Bua said in a 60-page finding that the widespread hiring of government employes based on their political loyalties violated the First and 14th Amendments.

"The factual record before the court conclusively demonstrates . . . that the defendants deliberately use the challenged patronage practice to help elect regular Democrats and help defeat their opponents," Judge Bua wrote.

This unfair advantage in favor of party loyalists, he added, "gives defendants an actual, significant advantage in elections," thus injuring those who might want to challenge incumbents.

The full effect of today's ruling on what until recently was called "the nation's most effective political machine" is not yet clear.

Bua set Oct. 12 to hear suggestions on how to change the hiring system and perhaps provide a remedy to those damaged by patronage in the past. Democratic Party officials said they would appeal his ruling.

Bua's ruling comes seven years after most city and Cook County leaders signed a "consent decree" that prohibited them from firing workers who did not do their bit for the party by either making contributions or soliciting votes.

Like today's ruling, that decree grew out of a suit filed in 1969 by a then 27-year-old lawyer and Democratic independent who claimed the "spoils system" gave an unfair political advantage to the party in power and discriminated against people without party connections.

Along the way the suit went through a maze of legal battles, including occasional appeals to the U.S. Supreme Court.

Bua found uncontradicted evidence that city and county officials hired workers based on loyalty, not qualification. Such loyal "payrollers," as they often are called, are the backbone of the Democratic machine so effectively run for two decades by the late mayor Richard J. Daley, who died in 1976.

By some estimates, two-thirds of the 39,000 government jobs in offices ranging from the clerk of courts to the county forest preserve are held by party loyalists as rewards for their political work.

George Dunne, chairman of the party's central committee and Cook County Board president, said that if the decision is upheld on appeal, "I think there will be some fall-off" in party power." But he added: "I don't think it will be fatal."

Dunne said patronage is "a very wholesome thing" because the recommendations politicians receive from their supporters are helpful. He insisted that the political power of patronage is often overestimated.