Rudy Giuliani played to the crowd Friday at a gathering in Washington marking the 25th anniversary of the Federalist Society, assuring the conservative legal group that if elected president he would appoint federal judges who adhere to their principles.

As the only presidential candidate to speak at the ceremony, Giuliani — a candidate whose pro-abortion rights, pro-gay rights positions might drum up some skeptics in the group — used the stump to spell out a conservative legal agenda geared to their liking, while taking shots at the Democratic candidates.

Giuliani cited Supreme Court Justices Antonin Scalia, Clarence Thomas and Samuel Alito and Chief Justice John Roberts as models for the judges he would appoint to the federal bench.

He contended that Democrats Hillary Rodham Clinton, Barack Obama or John Edwards, as president, would select judges who were "activists and try to legislate social policy."

"We believe in the rule of law, not in the rule of judges," the former New York mayor said.

All of the presidential frontrunners were invited, according to the Society, but Giuliani was the only one to accept. GOP candidates Fred Thompson and Mitt Romney both cited scheduling conflicts. Romney adviser Barbara Comstock said Romney did host a breakfast for Federalist Society members in Washington Friday, but that he couldn't attend since he was campaigning in Nevada.

Giuliani did not mention his Republican rivals in his speech, but did make a joke at Clinton's expense. He suggested she be inducted into the Federalist Society because in addressing a question about driver's licenses for illegal immigrants, Clinton at one point indicated that it was a decision best left to the states.

"This is the only time in her career that she has decided anything should be decided on a state-by-state basis," he said to an audience that strongly advocates states' rights. "And you know something, she picked out absolutely the wrong one."

He also praised a judge who declared the capital city's gun ban unconstitutional and ridiculed efforts to eliminate the words "under God" from the Pledge of Allegiance.

Giuliani has been held suspect by some conservatives because as mayor of New York he backed some gun control laws and has supported a woman's right to abortion. Mostly Democrats, his appointees included an abortion-rights supporter, gay activists and a judge who ordered the city to pay for an indigent New Yorker's sex change operation, among others. Another judge argued prostitution should be redefined according to the changing cultural and sexual practices of recent decades.

But Giuliani was limited by the city's system of appointing judges. An advisory committee, controlled by Democrats, submitted candidates from which Giuliani could choose. And Giuliani has noted he was choosing municipal judges who mostly handled criminal cases, not judges who would evaluate matters of constitutional law.

He has sought to alleviate those concerns, aligning himself with legal conservatives such as former Solicitor General Theodore Olson, who introduced him at Friday's gathering.

The Federalist Society, as a group, does not endorse any candidate, but the support of its members are considered key, since top dogs in Republican law circles tend to network with this group.

Several other prominent members are advising Giuliani's campaign and have served as a bulwark for Giuliani against criticism from social conservatives.

He also said that as president he would demand that the Senate change its rules for confirming federal judges, decrying the filibusters that blocked some of President Bush's appointees and the atmosphere at nominating hearings.

He argued that nominees should be judged on their qualifications, honesty and integrity, not their judicial philosophy. He said such a standard should apply whether the president is a Republican, nominating conservative judges, or a Democrat nominating liberal judges.

FOX News' Molly Henneberg and Mosheh Oinounou and The Associated Press contributed to this report.