Peking — Remember the offshore islands crisis of 1958? Peking in those days seemed to be trying to drive the Chinese Nationalists off the islands of Jinmen (Quemoy) and Mazu (Matsu), commanding access to the mainland ports of Xiamen (Amoy) and Fuzhou (Foochow).
There was a furious debate among Americans as to whether the United States should help the Nationalists defend not Taiwan itself, but these offshore islands.
Eventually the crisis went away. Mainland attacks on the islands ceased, while Nationalist leader Generlissimo Chiang Kai-shek spent huge amounts of American aid funds to turn Jinmen and Mazu into impregnable fortresses.
Now, as Chinese leaders welcome President Reagan to their ancient capital today, the shoe seems to be on the other foot.
Mr. Reagan's attitude toward Taiwan is well known here. He wants to develop friendly relations with China, but will keep up unofficial relations with ''the people in Taiwan.'' He will not give up old friends in order to make new ones.
Chinese leaders accept this attitude, but they are likely to tell Mr. Reagan that it is Taiwan, not Peking, that is obstructing progress toward a peaceful settlement.
Mr. Reagan has himself said that he does not oppose the unification of Taiwan with the mainland - so long as it comes about peacefully.
Taiwan continues to hold its offshore islands, and Peking says it does not harass the islands. On the contrary, it is the Taiwan forces on these islands, Chinese officials say, that harass peaceful shipping going to and from mainland ports.
Last month a Japanese car-carrying freighter was shelled as it dropped anchor outside the port of Fuzhou. According to the captain, 20 cars were damaged and a hole 11/2 yards wide was torn in the deck.
China blamed Taiwan for the March 11 attack, a charge the Taipei government denied. But according to a Japanese Foreign Ministry official, it did admit that its garrison on Mazu Island fired warning shots at approximately the same time the freighter said it had been hit.
A dispatch in the official Xinhua news agency of China claims that Taiwanese forces previously shelled merchant ships of Panama, Japan, and Korea on Feb. 2, Feb. 11, and March 2.
''These successive shellings indicated clearly that the Taiwan authorities attempted to create tension in the Taiwan Strait,'' the dispatch said, ''to support their recent demand for US sales of sophisticated arms to them in order to disrupt relations between the People's Republic of China and the United States.''
Peking refuses to promise explicitly never to use force to reunify Taiwan, claiming that such a pledge would be an admission that it lacked sovereignty over the island. But in every practical sense, Peking argues, it has shown that it wants peaceful reunification.
It has proposed talks to this end, it has set no time limit or preconditions for these talks, and in the meantime, it proposes peaceful commerce and freedom of travel between Taiwan and the mainland. It is Taiwan that so far has stubbornly refused to accept any of Peking's offers.
The clearest indication, Chinese sources say, of Peking's peaceful intentions is that after many years of neglecting Fujian Province's development on the grounds that it was a potential war front, Peking is now giving high priority to the economic development of this province.
Xiamen and Fuzhou are the two principal ports of this province, and Taiwan could block these ports if it chooses from its garrison islands of Jinmen and Mazu.
Taiwan says it needs sophisticated United States arms in order to defend itself from the possibility of a Chinese invasion. The US accepts the argument, but has also promised Peking to reduce its sales from year to year and not to supply arms more sophisticated than those it has already supplied.
Visitors to Fujian say that Peking's commitment to economic development is long term, and that it makes no sense for China to be spending large sums on civilian infrastructure if it were planning any military action in the near future.
The Chinese leaders, while insisting on their sovereignty over Taiwan (as Taiwan asserts its sovereignty over the mainland) will undoubtedly press this view upon President Reagan and ask for continued strict observance of the arms sales limitation agreement.