Cairo — Less than two months ago, Ibrahim Shukry, leader of the tiny Socialist Labor Party in the Egyptian parliament, sat in his office, tired and dejected. President Anwar Sadat had thrown most of the party leadership in jail and shut down the party newspaper, al-Sha'ab. Attendance at the weekly party meetings had plummeted, and there were signs the party itself might soon disappear.
Across town at Talaat Harb Square near the fashionable Groppi's Cafe, the headquarters of the opposition National Progressive Unionist Party was raided, all papers and typewriters confiscated, and the doors sealed with red wax.
Today, Mr. Shukry has met with President Hosni Mubarak and speaks with him frequently on the phone. Khalid Mohieddin, head of the NPUP and a former pariah to the Egyptian news media, has had several interviews explaining his party's position in major magazines and has also met Mr. Mubarak.
The turnabout is part of the new Egyptian President's national program, which calls on all different political groups to unite for the good of the country.
''The philosophy on which we should all agree and which should direct our work,'' said Mr. Mubarak in his address to the opening session of the Egyptian parliament on Nov. 8, ''is that Egypt is above all. . . Opposition has a role to play in the national march by presenting studied views and honest criticism away from slander and unfounded accusations.''
Mr. Mubarak's invitation for a national dialogue has been met by a keen interest from the opposition, who have in turn retreated from their extreme antigovernment positions of the last few months and indicated to the government they are willing to play the political game.
''The problem with Sadat was that he couldn't understand that another opinion was not against him personally,'' says Mr. Shukry, whose party now supports the government and has gained public support. ''The most important thing with Hosni Mubarak is that he wants to talk to the opposition and understand us more. If he understands, then we can cooperate.''
In the last months of the Sadat regime, relations between the SLP and the government deteriorated seriously. The SLP platform was against granting military facilities to the United States, providing refuge for the Shah of Iran, normalization of relations with Israel, and the government's economic program.
Mr. Sadat publicly attacked Mr. Shukry in the Egyptian parliament last May. Meanwhile, the party's representation shrank from 25 out of 399 seats in parliament to only 11, as frightened assembly members deserted the party. In return, the party newspaper became increasingly antagonistic. An infuriated Mr. Sadat closed it and threw its editor in jail during his September crackdown.
''When Sadat came and attacked us,'' Mr. Shukry says, ''we had to defend ourselves.'' A considerable degree of sophistication is coming into play now in the political arena as the government and the legal political opposition reassess their stands toward each other.
The NPUP at first asked its members to vote ''no'' in the plebiscite confirming Mubarak as president, because he said he would continue with Sadat's previous policies. Now the party says it is prepared to cooperate with the government.
Mr. Mohieddin says they were encouraged by the President's speech. ''In it we found some positive aspects, some coming changes and thus we welcome to work for a solution for Egypt's crisis.''
Both the SLP and the NPUP have agreed to set aside their party platforms for the moment for the sake of security and stability, which Mr. Mubarak has declared to be Egypt's top priorities at this stage.
But both Mr. Shukry and Mr. Mohieddin attribute Egypt's economic problems and the rise of religious violence to the policies of the Sadat regime. Both have indicated that sooner or later they expect Mr. Mubarak to make fundamental changes in his Cabinet and in Egypt's current parliamentary system, which concentrates the overwhelming share of power in the hands of the president.
''If Mubarak is only President, and not prime minister and head of the ruling party (as Sadat was),'' says Mr. Shukry, ''it will give more opportunities to the parties and democracy.''
The NPUP and the SLP have their own solutions to the religious question, that is, to recognize and institutionalize its activism in a political party.
''This trend exists in Egypt,'' says Mr. Mohieddin. ''Thus, if we have to face it we should start by a discussion and creating a true religious trend so it does not disappear and then reappear again. This happened four times (under Nasser and Sadat).''
Like the opposition parties, most Egyptians are adopting a hopeful but nonetheless wait-and-see attitude as the Mubarak government begins to act.