The two giant pandas whose troubled romance has preoccupied Washington for years flirted actively at the National Zoo last night in what seemed a vivid demonstration of the ability of science to remedy the defects and disappointments of nature.

Before the eyes and cameras of assembled members of the news media, and to the delight of patient and eager visitors, Ling-Ling and Hsing-Hsing, who have been here for 13 years without producing living offspring, between 7 and 7:30 p.m. showed the physical togetherness that often precedes mating.

The unexpected courting behavior, which came three months after Ling-Ling, the female, would normally have entered her brief annual period of romantic availability, apparently was less the result of any sudden tender afterthought on the part of either animal than of a series of hormone injections.

"I regard it as a breakthrough," said zoo collections manager Elizabeth Frank. "It is quite remarkable."

Although the injections had apparently brought on Ling-Ling's mating cycle, as of about 9 p.m. the pandas had not yet actually carried out a successful mating. However, zoo officials said they believed that the peak of the cycle was still to come.

The situation is "basically a wait-and-see from now on," said Frank.

Through the 1970s and 1980s, the two pandas, gifts from China, have been great popular favorites, and their failure, for a variety of reasons, to start a family has been a source of dejection and regret to both zoo officials and the public at large.

While the panda couple had experienced a catalogue of difficulties in breeding successfully, one of them was not the failure of Ling-Ling's mating period to arrive, with high regularity, in mid-March.

This year, March passed, followed by April and May, with no sign that nature was taking its usual course. Zookeepers, heeding the ticking of Ling-Ling's biological clock, decided to intervene.

On June 12, they began a series of 10 injections of "follicle-stimulating hormone," designed to stimulate Ling-Ling's natural heat cycle.

Collections manager Frank said that although earlier she "did not expect her to go into heat," she now believed that "the hormone injections worked."

Signs that the mating period was beginning became evident Sunday, according to Dr. Robert J. Hoage, the zoo's public affairs chief.

Ling-Ling began "chirping and bleating and . . . soliciting his Hsing-Hsing's attention." The male panda began to reciprocate her attentions.

Zoo officials described themselves as delighted and surprised.

In addition to the indications given by the animals that the mating cycle had arrived, other clues were apparent yesterday. Visitors to the panda house seemed particularly eager, and especially well-armed with questions, cameras and zoom lenses.

The pandas first mated successfully in 1983. Ling-Ling has given birth twice, but both cubs died of infection, one before birth and one shortly afterward.