MOSCOW (AP) _ Solidarity leader Lech Walesa mourned Andrei D. Sakharov in a dark cemetery long after the crowds had left, and he then moved on to meet with the human rights champion's successors.

Walesa said Tuesday he met maverick Communist Boris Yeltsin, historian Yuri Afanasyev, and others in the InterRegional Group of progressive Soviet parliamentarians at a wake for Sakharov Monday night. In his last speech, Sakharov had urged the group to become an official opposition to the Communist Party.

Walesa, whose Solidarity trade union overwhelmed Poland's Communist Party in free elections and formed the first non-Communist government in Eastern Europe, said Sakharov's death ''was a huge loss for the reforms, for perestroika'' in the Soviet bloc.

''His mind, his thoughts were needed by the Soviet people very much in these difficult times,'' Walesa said. In the Soviet Union, he said, ''the crisis has not yet begun.''

Walesa and Sakharov, who both won Nobel Peace prizes, fought for human rights and peaceful reform at the cost of their personal freedom.

Walesa came to Moscow on a private visit for the funeral of Sakharov, whom he met in Paris at the invitation of French President Francois Mitterrand. His flight was delayed by bad weather, so he arrived at the cemetery Monday night, well after Sakharov was buried.

In an interview at the Polish Embassy before departing Moscow, Walesa said that although this was a private visit, his advisers are working on an official visit at an unspecified date. Walesa is expected to meet with President Mikhail S. Gorbachev on that trip.

When asked to compare the reform efforts in Poland and the Soviet Union, Walesa looked at a Soviet reporter and said, ''You do not know what real crisis is. You are coming to it.''

''The big question is how to combine economic reforms with political reforms,'' he said. ''A strong will and strong nerves are needed to choose the right path to overcome all the difficulties.''

He spoke in favor of the Polish path of encouraging small private enterprise, selling stock in businesses, and letting workers and farmers ''feel like property owners.''