Peter Flaherty, nominated for deputy attorney general, denied yesterday he has ever urged defiance of school busing laws, and sat silently as detractors and defenders roared through a shouting match over whether he is a "racist."

"I did oppose busing," Flaherty, Pittsburgh's mayor, said in rebuttal of charges he urged citizens to fight busing laws. "But at no time have I urged anyone to defy the law . . . I can assure you that I would never encourage anyone to defy the law."

Flaherty testified at his Senate confimation hearings shortly after an uproarious war of insults between Florence Bridges, a black Pittsburger who called Flaherty "an expert racist" and Sen. Orrin Hatch (R-Utah) who charged Bridges herself might be the racist.

Bridges charged in her Judictary Committee testimony that Flaherty is "an expert racist" who is "antiback, antipoor and technically not qualified" to be deputy attorney general.

"Peter Flaherty cares more for dogs than he does for poor children!" she said, and claimed that, in Pennsylvania, "the whites always knew that Pete Flaherty was in their pocket."

Hatch, a friend of Flaherty for 15 years, interrupted her angrily at Flaherty's defense, saying the nominee is "certainly not a racist" and adding, "much of what you express indicates you may be a racist!"

"You're precisely what causes the problems!" Hatch said. "We ought to be ashamed as Americans if this is the kind of witness we have to listen to!"

Bridges jumped to her feet, told Hatch "you have no right to call me names," refused to turn over materials she said documented her charges and stomped off in a huff.

Flaherty took it all in from his hearing room seat, saying nothing.

The question of his position on the issue of school busing for racial integration was raised by Sen. Howard Metzenbaum (D-Ohio), who said he was concerned about newspaper reports suggesting the major advocated defiance of a desegregation ruling by the state human relations commission in 1972.

"I did not advocate defiance," Flaherty quietly told Metzenbaum.

He said the question then at issue was "not whether to comply but how to comply" with the desegregation ruling.

"I said I thought busing would be counterproductive," he testified. "I favored that we look at the other, alternatives, I never used the word 'defy.'"

Judiciary Committee Chairman James O. Eastland (D-Miss.) said afterward that he expected the panel to approve Flaherty's nomination, the Associated Press reported.

Eastland said at the end of two days of hearings on the nomination that he hoped the committee would clear Flaherty for the No. 2 job in the department before the end of this week.