Prime Minister Margaret Thatcher returned today from her pilgrimage to the Falklands, a grueling journey that highlighted the strong hold of the distant colonial outpost on Britain and its leader.

Flying nearly 24 hours in each direction, much of the time in noisy military aircraft, Thatcher spent almost five days there fulfilling a hectic schedule that enabled her to meet about half of the 1,800 residents of the islands and visit many of the British forces garrisoned there. The trip seemed to deepen her resolve that the islands remain in Britain's hands.

"One thing the islanders have made perfectly clear," the prime minister said in an interview before she left for home, framed by television cameras so that a Union Jack was flapping behind her, "is that these islands are British. They are the queen's loyal subjects and they wish to stay that way."

Yet for all the strong reasons Thatcher must have had to see a place with which she forever will be identified, the trip was widely perceived here as a dramatic political ploy. It was for this reason, money changers said, that the pound sterling immediately came under attack--in anticipation of an early national election to take advantage of the government's current strength.

At one point Monday, the pound fell 3 cents against the dollar to its lowest level since 1976. After interest rates were forced up a point Tuesday, the Conservative Party chairman, Cecil Parkinson, said three times in one nationally broadcast statement that no election is in the offing. Nonetheless, political fever remained and The Guardian's lead headline today declared: "Thatcher Returns to Election Pressure."

The prime minister apparently disagrees. After meetings with financial advisers, she put out the word through her spokesman that everyone should "calm down." Bettors seemed to believe her. A leading bookmaker, William Hill, said March 1984 was the favorite, at 6-4, for the election.

Another reason offered in criticism of Thatcher's timing for the trip is the publication next week of the 100,000-word report on how the Falklands war came about, prepared by a commission of prominent persons under the chairmanship of a former ambassador to Washington, Lord Franks. Opposition politicians contend that by choosing this week, Thatcher was seeking to deflect in advance any criticism of her for not foreseeing the crisis last spring.

The journey was a considerable media event, especially for television--although Thatcher's air travel was done in secret for security reasons. A British Broadcasting Corp. team already on the islands last week, and reportedly eager to leave, was firmly advised to stay on. Other reporters were rushed in.

Long reports were screened each night showing the redoubtable prime minister in turns windswept on the rugged island hillsides, joyful as she received accolades from Falklanders young and old, or tearful as she placed wreaths on the graves of fallen British soldiers.

One scene showed her firing a 105 mm artillery piece, protective earmuffs jauntily placed over her scarf.

"All I can see through this thing," she said as she struggled with the sight, "are pairs of boots." After the gun's heavy thud, Thatcher, eyes wide, turned toward the camera with a look of good-humored horror. In all, the episode displayed a geniality the British rarely see in her.

How well the trip went down at home is difficult to say with certainty. The Guardian, the liberal newspaper that is most critical of Thatcher, observed that her "particular friends in the media have used the excursion to whip up the flagging Falklands factor," the name given to British pride felt after the war.

On the other hand, a young economist whose political views could hardly be further from Thatcher's was touched by her pause, uncharacteristically drawn and disheveled, before the simple white crosses on the graves of 14 dead British soldiers at San Carlos. "There was mist in my eyes," he said, as he thought what the moment probably meant to her. "After all," he said, "she sent them there."