David W. Marston, the Republican prosecutor from Philadelphia whose dismissal touched off a national controversy, announced yesterday that he's looking for a new job: governor or Pennsylvania.

The 35-year-old Marston told reporters at his south Philadelphia home that he was entering the crowded field for the crowded field for the May 16 GOP primary to give the public, rather than "the political bosses," the chance to pick a governor.

He said later in a telephone interview that he had no intention of running for public office until he was ousted as U.S. attorney by the Carter administration in January.

His job became a focus of national publicity after President Carter disclosed that Rep. Joshua Eilberg (D-Pa.) had called him on Nov. 4, urging Marston's replacement.

Since Eilberg was a possible target of an investigation by Marston's office at the time, there were charges of obstruction of justice when the prosecutor finally was dismissed in January.

Justice Department officials barely could disguise their satisfaction at the news of Marston's announcement yesterday. They have complained privately that Marston was a political opportunist who had turned a routine replacement into a launching pad for public office by manipulating the press.

Marston said in the phone conversation that he was prepared for the "I told you sos." "I know I'll be criticized by the old politicians like House Speaker (Thomas P.) Tip O'Neill, who called me a vicious political animal," he said.

"But I promised that I would not resign to run for any office if they (Carter administration officials) would let me serve out my term.

"The president rejected that pledge and in doing so rejected the appeals of the people of Pennsylvania that I be kept on" Marston said.

The new candidate said he would run an inexpensive "no frills" campaign. He acknowledged this was possible because the controversy over his dismissal made his name known statewide.

"If President Carter hadn't caved into politics without principle and pulled the plug on the U.S. attorney's office, people wouldn't know my name," he said.

He noted that both major parties were making his ouster an issue, so "I don't know why I should be precluded from doing what people all over the state have urged me to do," namely run for governor.

He also emphatically denied reports that he had attended meetings in 1975, while an aide to Sen. Richard Schweiker (R-Pa.), where federal financing of a Philadelphia hospital project was discussed.

The New York Times reported last week that Stephen B. Elko, longtime top aide to Rep. Daniel J. Flood (D-Pa.) has told Justice Department prosecutors that Marston was among the Schweiker aides who met to arrange a $14.5 million federal grant to the hospital.

"I never participated in any meeting on any health care or hospital issue," he said.

A knowledgeable Justice Department source has said it is likely Marston will be called as a witness in the Flood-Eilberg investigation because of Elko's statements. It was the two congressmen's involvement in the hospital financing that Marston's office reportedly was investigating at the time Eilberg called President Carter.

Marston also said in the phone interview yesterday that there is "noghing unusual" in the arrangement whereby a Philadelphia law firm is paying him $60,000 a year regardless of how much work he does.

"I'm doing at least as much work as the other candidates in the race who are attorneys," he said. "The firm knows what I'm worth."

Marston is only the latest former prosecutor to enter the Republican primary. Richard Thornburgh, a one-time head of the Justice Department's criminal division, and Arlen Specter, former Philadelphia district attorney, already are candidates.