Rep. John M. Murphy (D-N.Y.), one of President Anastasio Somoza's strongest congressional supporters, secretly visited Nicaragua this week and, at Somoza's request, attended the meeting where U.S. Ambassador Lawrence Pezzullo pressed the Nicaraguan leader to resign.

Murhpy, long an outspoken defender of the Somoza regime, refused to say last night whether he thinks Somoza now should step aside.

"That's a matter for negotiations between Somoza and the U.S. government," Murphy said. "I don't think it would be appropriate for me to comment publicly at this time.

Murphy did say he still believes that Somoza's fall would lead to a takeover of Nicaragua by pro-Cuban, Marxist forces.

"The intelligence community no longer masks the fact that there is Cuban involvement on a major scale on the side of the rebels fighting Somoza," he said. "It is, in effect, a communist assault. Even those anti-Somoza forces that are not communist are now controlled by the communists."

But, despite this assertion, Murphy continually turned aside questions about whether he thinks Somoza should try to retain power and reject the Carter administration's call for his replacement by a broadly based coalition government.

His silence on that point was particularly significant because Murphy, together with Rep. Charles Wilson (D-Tex.), is regarded as coleader of what is often referred to as "the Somoza lobby" - a group of influential Washington figures who have argued that Somoza deserves U.S. support as a dependable, anti-communist ally.

As chairman of the House Merchant Marine Committee, Murphy recently led the successful fight for passage of the enabling legislation to put President Carter's Panama Canal treaties into effect. Because the administration needed his help and was reluctant to antagonize him, it hesitated for a long time before publicly calling for Somoza's ouster.

Murphy said last night it was "no coincidence" that he was in Nicaragua when Pezzullo, who arrived there to take up his post Wednesday, called on Somoza that same evening to urge him to resign.

Early this week, the administration relayed to Somoza through Nicaraguan Foreign Minister Julio Quintana, who was in Washington, a proposal that Somoza resign in favor of a council of prominent Nicaraguans. The council then would attempt to mediate among the various factions opposing Somoza and win agreement on a coalitition government.

Murphy said that on Tuesday afternoon he received a request from Somoza to go to Managua and traveled there the same day with Quintana. He returned here Thursday.

The trip was made in secrecy, with neither the administration nor Murphy's pro-Somoza allies in Congress being informed of it. Reliable sources said the State Department did not know anything about it until Pezzullo arrived in Managua and found Murphy waiting to attend the ambassador's meeting with Somoza at the president's military headquarters.

"I did not go as a representative of the U.S. government," Murphy said last night. "I went to personally evaluate the situation at this most critical time and, during the meeting in the bunker, I did not participate in the negotiations. I was there as an observer."

Other sources familiar with the meeting confirmed that Murphy did not interject himself in the discussions between Somoza and Pezzullo. They added, though, that when Somoza left the room at one point to confer with his advisers, Murphy was among those who accompanied him.

Murphy's friendship with Somoza goes back to the early 1940s when the two were classmates at LaSalle Military Academy at New York. During World War II, when Somoza was a cadet at the U.S. Military Academy and Murphy was an infantry officer, Somoza was assigned for a time to a training company under Murphy's command in South Carolina.

Their friendship, Murphy said yesterday, continued over the years; and, after he entered Congress in 1962, Murphy quickly emerged as a fierce opponent of moves to loosen the then close ties between the United States and Somoza. When Somoza was inaugurated for his second term two years ago, Murphy was President Ford's special representative at the ceremonies.