SPRINGFIELD — To strike down sweeping pension changes, the Illinois Supreme Court crafted a sweeping ruling that covered 227 years of history and featured references to James Madison, Abraham Lincoln and the Great Depression.

The court’s primary legal authority in determining pensions could not be reduced by the General Assembly came from the 1970 Illinois Constitution, which states public worker retirement benefits “shall not be diminished or impaired.” Those words rest in Article 13, Section 5 — which was taken almost exactly from language in New York’s constitution.

But the court’s primary moral authority derived from a line of historic examples in which the justices wrote that the state’s basic argument — that a financial emergency necessitated a workaround to the constitution — rang untrue.

“Crisis is not an excuse to abandon the rule of law. It is a summons to defend it,” Justice Lloyd A. Karmeier wrote in Friday’s 38-page opinion. “How we respond is the measure of our commitment to the principles of justice we are sworn to uphold.”

Kirk C. Jenkins, a partner at Sedgwick LLP in Chicago and a long-time high court observer, said the decision is one of the court’s most compelling written opinions in years.

“What actually stuck out to me is that in many places it was quite eloquent — particularly in its discussion of the importance of constitutional principles even in a time of crisis,” he said. “Despite the volume of briefing, they did a significant amount of research on their own. I thought the opinion did a lot of credit to the court.”

John M. Fitzgerald, a partner at Tabet, DiVito & Rothstein LLC who represented a teachers’ union in the case, said the work the court put into the decision is clear.

“There’s no question they cited authorities that had not been specifically raised, and that’s a testament to how exhaustive the court’s analysis was.”

The analysis stretched back to the time following the Revolutionary War before the U.S. Constitution was adopted.

The Illinois justices quoted from James Madison’s “Federalist No. 51,” published in 1788, which says, “If men were angels, no government would be necessary … you must first enable the government to control the governed; and in the next place oblige it to control itself.”

“Obliging the government to control itself is what we are called upon to do today,” Karmeier wrote.

The Illinois court also invoked the U.S. Supreme Court’s rejection of President Abraham Lincoln’s suspension of the writ of habeas corpus during the Civil War. Though Karmeier and the justices noted that crisis “by any measure, eclipsed the one facing our General Assembly today,” they also wrote that the nation’s highest court back then “employed language that seems appropriate to this case.”

The court in that decision wrote that the U.S. Constitution “is a law for rulers and people, equally in war and in peace, and covers with the shield of its protection all classes of men, at all times, and under all circumstances.”

As long as public retirement systems have existed in Illinois, legislators have struggled to fund them. That led to doomsday predictions dating back almost a century ago, the court noted.

“As long ago as 1917, a report commissioned by the General Assembly characterized the condition of [s]tate and municipal pension systems as ‘one of insolvency’ and ‘moving toward a crisis’ because of financial provisions which were ‘entirely inadequate for paying the stipulated pensions when due,’” Karmeier wrote.

“Similar warnings were issued by the Illinois Public Employees Pension Laws Commission in biennial reports it published between 1947 and 1969.”

The idea that chronic under-funding of the state’s retirement systems is nothing new was recently popularized, to some extent, by Eric M. Madiar, the Illinois Senate Democrats’ former top lawyer who now runs his own lobbying firm.

Madiar declined to comment on the decision.

But he wrote in a paper last year that the 1917 report and others like it — along with the pension protection clause in the constitution — would help defeat the reform law because it showed the problem wasn’t just caused by an unforeseen emergency but by the state’s “long-standing and conscious failure to properly fund the pension systems.”

And to the extent the state’s problems were caused by outside factors, such as the global financial crisis that began in 2008, the court said its message has always remained the same.

Economic downturns “are cyclical and expected,” Karmeier wrote, citing the 1935 case of People ex rel. Lyle v. City of Chicago.

In that case, the Illinois Supreme Court forced the city to pay judges because of a constitutional provision protecting their salaries — and in spite of the fact that the Great Depression had wiped out a large portion of tax revenues between 1929 and 1932.

“In rejecting the city’s position, we acknowledged that legitimate efforts to relieve the city’s difficulties were commendable,” Karmeier wrote. “We held, however, that any departure from the law is impermissible unless justification for that departure is found within the law itself. Exigent circumstances are not enough.”

Judges salaries were, again, a key issue more recently. About 10 years ago, then-Gov. Rod Blagojevich used his veto power to remove cost-of-living adjustments to judges’ salaries.

Again, the government cited economic issues as a reason the cuts were necessary. And again, the high court held that wasn’t a strong enough argument.

“‘No principle of law permits us to suspend constitutional requirements for economic reasons,’ we held, ‘no matter how compelling those reasons may seem,’” Karmeier quoted from that decision, Jorgensen v. Blagojevich, in 2004.

“So it is with the case before us today.”