WIMBLEDON, ENGLAND, JUNE 25 -- Vijay Amritraj was the oldest man in the Wimbledon field at 36, and perhaps the most prestigious as president of the Association of Tennis Professionals tour. But Amritraj was here as a lowly qualifier, and it took five sets today before his age finally told and he was defeated by Joey Rive of Puerto Rico.

Amritraj earned his way into the draw in a qualifying event last week at Roehampton, entering as a lark after winning a 35-and-over tournament in Windsor two weeks ago. He nearly became the story of the opening day before Rive prevailed, 5-7, 6-4, 6-4, 5-7, 6-4.

"This was not on my agenda," Amritraj said. "The pain comes after the match. The recovery will be sore."

Amritraj has played at Wimbledon in four decades. He first came here as a junior in 1969 and made his first appearance in the main draw in 1972. His most recent match here had been a second-round loss in 1987. He failed to qualify in 1988 and did not try last year.

Amritraj, a California resident originally from India who has won 16 titles with his elegant shotmaking, was returning to the site of some of his most famous if bittersweet matches. He lost a five-set quarterfinal to eventual champion Jan Kodes in 1973, after being up by 5-3 in the fifth set. In 1979 Amritraj led eventual champion Bjorn Borg by two sets to one in the second round, only to lose. In 1981 he led Jimmy Connors in the quarters by two sets and 3-1, but lost again.

Today he was gratified to have made it into the tournament, and to extend Rive. The last time Amritraj played five sets was in 1987, in a Davis Cup match against Argentina, when he came from two sets down to beat Martin Jaite.

"It's very satisfying to think I qualified," he said. " . . . I don't run around playing qualifying, but this is just a very special event." Goldie Works Way Back

Dan Goldie only recently has recovered from a stress fracture in his left leg, but his rehabilitation may be hastened by a return to Wimbledon, where he was a surprise quarterfinalist last year.

"You have added confidence coming back," he said. "But there's also some added pressure to repeat. So there's a little of both."

Goldie, a former McLean, Va., resident, who is ranked No. 59, pulled off one of the more notable upsets last year when he beat Jimmy Connors over four sets in the second round, before he was stopped by Ivan Lendl in the quarterfinals. Goldie's summer was ruined when he fractured his left tibia in July, shortly after the D.C. Sovran Bank Classic. He was sidelined for several months, and for three months his only exercise was swimming.

"I'm injury-free for the first time in a year," he said. "It still bothers me some, it hasn't been easy. The injury took its toll as far as competitive edge and mental concentration. I've slowly worked my way back. I'm actually hitting the ball better. My physical capabilities are back."

What Goldie needs next is match play. But he faces a difficult second-round match against veteran serve-and-volleyer Ken Flach. Controversy Over Drug Testing

The ATP denied that it refused a request to cooperate in drug testing at Wimbledon, saying it never was asked by any official about the issue.

At the same time, the Women's Tennis Association announced it had already preselected Wimbledon as the site of its own first drug tests. The WTA adopted a random drug testing policy in November 1989, but this will be its inaugural implementation.

Published reports had said officials of the men's and women's tours would not agree to testing here.