Former presidential hopeful Phil Gramm testified Thursday that he never approved thousands of dollars in consulting payments to former Gov. George Ryan's daughters and staff in return for Ryan's endorsement. And he said his aides would not have condoned such a deal, either.

"It's sort of like the difference between love and prostitution," the folksy former Texas senator testified, drawing gasps and laughter from spectators at a hearing with the jury out of the room. "You don't pay people to like you."

Ryan, 71, and lobbyist friend Larry Warner, 67, are on trial on charges of fraud and racketeering. Among other things, Ryan is accused of using his position as Illinois secretary of state during the 1990s to collect cash and other gifts.

Gramm ran for the 1996 Republican presidential nomination but dropped out of the race in February of that year. By that time, his campaign had paid thousands of dollars in fees to a Chicago-area consultant who passed the money through to Ryan's daughters and two aides, according to prosecutors.

U.S. District Judge Rebecca R. Pallmeyer stopped Gramm from testifying when prosecutor Zachary T. Fardon first asked him why he would not approve of such payments. The jury was escorted from the room and Fardon was then allowed to pose the question again, to see what Gramm's answer would be and whether it would be prejudicial to Ryan.

At that point the former senator made his comment about love and prostitution.

Pallmeyer said that when the jurors were brought back into the courtroom, Fardon could ask Gramm a yes or no question about his reason for opposing such payments.

"We're not going to have love and prostitution before the jury," Pallmeyer said.

Gramm said he had played no role in drawing up the Gramm campaign's Illinois budget, which called for $103,500 in consulting payments.

A Gramm aide, John Weaver, testified Wednesday that he was surprised at the amount and asked Ryan chief of staff Scott Fawell about it. He said Fawell answered: "That's the way we do things in Chicago."

Fawell was convicted in 2003 of racketeering in connection with Ryan's eight-year tenure in the secretary of state's office and his political campaigns. He is serving a 6 1/2-year sentence in federal prison.