The Maryland Republican Party found itself without a candidate for governor last night as two of its potential contenders dropped out of the running within 24 hours.

In the latest of a series of devastating blows to hit the state GOP this year, both Howard County Executive J. Hugh Nichols and former state senator and party chairman Aris T. Allen announced they were dropping out of contention for the Republican nomination for governor this year.

Allen's announcement came last night at a Baltimore press conference, just 24 hours after Nichols told party leaders he would not make the race because of potential primary competition from Allen, and his conclusion that he could not raise sufficient funds to mount a credible campaign.

The announcement by Allen, 75, a retired physician who works for the U.S. Health Care Financing Administration, shocked party officials already stunned by the withdrawal of Nichols -- whom they had persuaded to change parties in June after his Democratic gubernatorial bid had faltered.

"Obviously, it leaves us without a gubernatorial candidate," said state GOP Executive Director Jeannette Wessel, who attended Allen's press conference last night. "We have to regroup. I've never seen a group of people more flabbergasted. Everyone was expecting the exact opposite."

Richard Taylor, Maryland's Republican national committeeman, said Republicans are going to try to deluge Nichols with telegrams and phone calls in an attempt to make him change his mind.

Nichols, who has served two terms as Howard County executive, told party leaders Wednesday night that he did not think he could financially sustain a race if he had to fight a primary battle with Allen and then launch a general election contest against the Democratic nominee.

Nichols, according to party officials, became convinced in recent days that he could not raise campaign funds in competition with the man he believes will be the likely Democratic nominee, Baltimore Mayor William Donald Schaefer.

Allen had been expected to announce tonight that he was leaving his federal post in order to explore a campaign for governor.

The Maryland Republican Party had wooed Nichols -- who had been the first Democrat to announce his candidacy -- with promises of national Republican support and money.

In June, Nichols changed his party registration in what was widely believed to be a prelude to running for governor as a Republican.

But Allen's determination to also run -- a race for the party's nomination that would have kept Nichols from receiving national Republican support -- combined with his fund-raising difficulties, persuaded Nichols to withdraw.

Allen's announcement last night, which he said he made for personal reasons and for "harmony, unity and strength" in the GOP, left the party in a shambles.

For Maryland Republicans, who have traditionally been outnumbered three to one by Democrats, it was the latest disappointment in a discouraging period that began last year with the announcement that their most popular vote getter, Sen. Charles McC. Mathias Jr., will not seek reelection in 1986.

At a Republican dinner in Montgomery County last night, Republicans took up the chorus of disbelief over the lack of gubernatorial candidates.

"I'm sure there are several people out there who are interested in running," said Allen Levey, state party chairman, adding that they had been sitting the race out assuming that Nichols would run. When asked if he had any idea who might run, however, Levey said: "Not at all. It's too fresh in my mind."

The Montgomery dinner was in honor of Linda Chavez, a White House aide who is expected to announce her candidacy for the Senate seat from which Mathias is retiring, thus providing the GOP with a ray of hope on the state political scene.

Chavez said in her speech that the key to winning the election for Republicans will be the party's "ability to attract voters who still may consider themselves Democrats."

She said that among the key issues the GOP should focus on are jobs for the unemployed and crime. "Democrats offer a welfare check and with it dependency. We, as Republicans, need to offer jobs in the private sector . . . " she said.

Chavez said she plans to leave the White House early next month and announce her candidacy shortly thereafter.