Mario Merola, the Bronx district attorney, shrugged wearily today at the suggestion that politics might have something to do with his prosecution of Labor Secretary Raymond J. Donovan.

"We backed into the Donovan operation," he said, noting that evidence surfaced unexpectedly during an investigation into a murder case.

But Merola, who is generally respected citywide as a tough, unrelenting prosecutor, also made plain that he had no qualms about going after Donovan.

"Nobody's above the law," he said at a news conference today. "You gotta do what you gotta do, and this is what we did . . . . It's a difficult job."

Merola got a taste of just how difficult when Donovan emerged from the courtroom this afternoon declaring his and his fellow defendants' intention to "remove ourselves from the clutches of this inquisition . . . .

"Mr. Merola may have won today's battle by the misuse of his office, but I guarantee you he will not win the war," Donovan said.

Merola, 62, a blunt veteran of New York City politics, counters the Republicans' charges by noting that, although a Democrat, he usually runs for office with the GOP endorsement. "I don't know Democratic presidential nominee Walter F. Mondale and I'm sure he doesn't know me," he said in an interview.

A few weeks ago, after Merola had been criticized for alleged overzealousness in prosecuting a series of child-abuse cases at Bronx day-care centers, Republican state Chairman George Clark Jr. said he could support Merola as a Republican mayoral candidate against Mayor Edward I. Koch.

"He's the toughest DA in the city and a standup guy," Clark said. "He seems to say it the way he sees it. He's one of the persons who should be considered."

Although Merola has complained in private that the FBI delayed giving him critical tapes in the Donovan inquiry, he noted today that it was Reagan appointee Ed McDonald, head of the Justice Department's Organized Crime Strike Force in Brooklyn, who provided critical evidence for the indictment.

Born in the Bronx, Merola graduated from New York University and its law school and worked as an assistant district attorney before serving on the City Council from 1964 to 1972, where he was finance chairman.

The Bronx Democratic organization slated him for district attorney as an Italian American to balance the ticket. Since then, he has supervised the busiest district attorney's office in the city, with 260 lawyers and 40,000 arrests a year, including about 400 homicides.

Some attorneys have criticized Merola as a publicity hound, and he clashed publicly with Koch this summer over child-abuse cases: He called the city's investigation a "whitewash" and Koch attacked him for "McCarthyism." The grand jury failed to indict one of four child-care workers in one investigation, leading to questions of whether Merola had been overzealous.

Merola generally is known as competent and honest, however. "He's a very hard worker," said state Supreme Court Justice Theodore Kupferman, a Republican. "I had always thought he was doing as good a job as possible -- until now, anyway."

Kupferman was skeptical about the Donovan indictment. "The timing is way out of line," he said.