This ancient university city, its gothic quadrangles now surrounded by modern electronics plants, is one of the prime battlegrounds in Thursday's British election--a three-way marginal district where, on paper at least, Conservatives, Labor or the Liberal-Social Democrat Alliance could win.

The incumbent Tory member of Parliament, Robert Rhodes James, lost two-thirds of his 1979 plurality of 4,800 votes in last year's redistricting, which lopped off two strong Conservative wards. Labor controls the city council, and the new Social Democrats received almost one-third the votes in April's local elections.

With its sophisticated electorate almost certain to give a healthy majority of its votes to antigovernment candidates, Cambridge is exactly the sort of place where some anticipate "tactical voting" to take place on Thursday.

Tactical voting is a peculiarly British phenomenon, in which voters cast their ballots, not so much to help the party they like best, but to defeat the party they most abhor. In past general elections, tactical voting has tended to squeeze out the middle-road Liberal Party. But in a number of by-elections in the past two years, the Alliance was able to encourage tactical voting--most often by former Labor supporters eager to defeat Tories, but occasionally in the reverse direction--for its own benefit.

Here in Cambridge, big-name Labor and Alliance figures have swarmed in, trying to persuade anti-Tory voters to unite behind one candidate and defeat Rhodes James, the historian and Third-World economics specialist who has held the seat. The threat seemed serious enough that the Tories dispatched Foreign Minister Francis Pym here yesterday to bolster the local candidate.

But the threat appears to be all on paper. Huge gulfs of class and attitude have fought each other to prevent shifts from Labor to the Alliance, or vice versa. While they fight each other, the Tories are having a field day.

In the bar of Christ's College yesterday, while Pym chatted with students, an archeology professor brought Rhodes James the welcome news that his canvassing in a neighborhood of council houses (public housing) had found surprising support for the Conservatives.

That is a national trend, linked to Prime Minister Margaret Thatcher's policy innovation of allowing tenants to buy the homes they have been renting. Several hundred Cambridge residents are among the half-million who have done so nationally, and a targeted mailing to those people brought in "phenomenal results," according to the local Tory manager, Hugh Rudwick.

The same phenomenon was the target of derision at last night's closing Labor rally, held at the local junior college. The Labor candidate, county council member Janet Jones, is representative of the party's leftward movement. She is an ardent advocate of unilateral disarmament, whose biography notes that in her old district, "the local Labor Party men nicknamed her 'The Amazon,' " but even Jones seemed startled to find that two-thirds of the rally crowd were teen-agers, some of them with the distinctive dyed hair and painted faces of the punk culture.

The drawing-card for them, it turned out, was a counterculture figure calling himself "Attila the Stockbroker," a mustachioed man in his twenties wearing a black motorcycle jacket and blue jeans.

Before Jones' speech, Attila was brought forward to recite, at breakneck speed, a number of his own poems, including one he had written, he said, in anger over seeing Tory posters in council house windows. The title and refrain of the poem, he said, with apologies to the older people present, seemed to him to sum up what such voters were saying to Thatcher. The gist of Attila's message was that these voters were asking Thatcher to emasculate them. With that sort of approach characterizing the Labor campaign, there would seem to be much room for the Alliance to become the major opposition force. But, in reality, it is far more difficult.

A midday Alliance rally drew almost as many people as the evening Labor "jamboree," but of a very different type--a serious-minded crowd of 75, including a large number of young suburban-looking wives. The drawing-card for them was not Attila the Stockbroker, but Clement Freud, a Liberal member of Parliament, grandson of the founder of psychiatry, but perhaps best known as a television chef.

He made a very sophisticated appeal, conceding that the Tories would be returned to power nationally, and perhaps locally, but saying, "We need your vote so that the silent majority of Britain will not be invisible in the next Parliament . . . . The greater the disproportion between our vote and the number of seats we win, the more outrage will be felt at our rotten electoral system," and the better the chances for eventually getting the Alliance dream of proportional representation.

Translated to the local level, that was an argument for winning by losing, and it offered little help to Matthew Oakeshott, a London pension fund manager who is the Alliance candidate here.

Oakeshott, 36, followed his mentor, Roy Jenkins, from Labor into the Social Democratic Party in 1981, but he has not found it easy to gain a foothold here. A well-know local Liberal officeholder had been organizing his campaign for two years, but in the national division of Alliance races between Liberals and the Social Democrats, Cambridge went to the Social Democrats. Although Cambridge is his wife's home, Oakeshott had no base here when he was picked as the candidate in September, and there is still resentment by the displaced Liberals. Oakeshott has echoed the national Alliance line that Labor cannot win, and an Alliance vote is the only way to curb the Tory majority. But an afternoon of interviewing in the Cambridge market found no evidence that it was selling.

There are people switching from Labor to the Alliance, but not out of any calculation of the election odds. Vegetable stand owner Brian Gardner has voted Labor for the past 18 years, as his father did, but no longer. "Its like a left-wing Mafia has taken over my party," he said.

First-time voter Nadine Reynolds said she finds Thatcher "very right-wing" and Labor "very extreme," but she is not considering the Alliance. "They have not been around long enough to form a government," she said.

Any hope of building a bandwagon psychology for tactical voting for Oakeshott was pretty well destroyed yesterday when the Cambridge Evening News poll of 455 local voters gave Rhodes James 46 percent, Jones 29 percent and Oakeshott 24 percent.

Both the trailers immediately attacked the poll's credibility. But their counterclaims just clouded the picture further for the anti-Tory tactical voters, if there are any.